LogoLogo
OSDeploy.comTwitterPowerShell GalleryGitHub
  • Overview
  • OSDeploy Home
  • Module
    • Release Information
      • 2019-01
      • 2018-12
      • 2018-11
      • 2018-10
      • 2018-09
      • 2018-08
      • 2018-07
    • Functions
      • Main
        • Get-OSBuilder
          • Set Path
      • Maintenance
        • Repair-OSBuildTask
      • OSBMedia
        • New-OSBMediaISO
        • New-OSBMediaUSB
        • Show-OSBMediaINFO
      • OSBUpdate
        • Get-OSBUpdate
        • New-OSBUpdate
      • OSMedia
        • Get-OSMedia
        • Import-OSMedia
          • Batch Import-OSMedia
        • Update-OSMedia
          • Execute
      • OSBuild
        • New-OSBuildTask
          • Remove Appx Provisioned Package
          • Remove Windows Package
          • Remove Windows Capability
          • Disable Windows Optional Feature
          • Enable Windows Optional Feature
        • New-OSBuildTask (External Content)
          • Features On Demand
          • Language Packs
          • IsoExtract Content
          • Language Interface Packs
          • Language Features On Demand
          • Local Experience Packs
          • PowerShell Scripts
            • Update-OneDriveSetup
        • New-OSBuildTask (WinPE)
          • WinPE DaRT
          • WinPE Drivers
          • WinPE PowerShell Scripts
          • WinPE Extra Files
          • WinPE ADK Packages
        • New-OSBuild
      • PEBuild
        • New-PEBuildTask
          • Recovery
          • WinPE
          • MDT
        • New-PEBuild
    • PowerShell Gallery
    • GitHub
  • Docs
    • Reviews
    • Fan Requests
    • Quick Start
    • Tips
      • Task Naming
      • Verbose Logging
      • OSMedia Archive
      • OSMedia Updating
      • OSMedia Failed UBR Change
      • Windows Setup Wallpaper
    • Articles
      • Latest Latest Cumulative Update (Latest LCU)
      • Update Catalogs
      • Windows Setup with DaRT Remote Connection
      • Offline Servicing
      • Servicing Stacks
      • Work with Languages
      • DISM Cleanup Image Pending Operations
      • Win10 1607 Appx Issues
      • Updating an Updated WIM
      • OSBuilder OS Information
      • What Should I Update?
      • Windows 10 Setup and the ei.cfg
      • Automating Windows Update Downloads
      • Solutions
    • Recycle Bin
      • Instructions
        • Detailed
          • pebuild
            • scripts
              • Set-TimeZone
            • WinPE Types
              • Recovery
              • Recovery DaRT
              • Windows PE
              • MDT
            • Auto ExtraFiles
            • Drivers
              • RegAdd ActivePowerScheme
              • RegAdd AeroLite Theme
              • RegAdd Browse
              • RegAdd PowerShell ExecutionPolicy
            • ExtraFiles
              • Wallpaper
          • Update
      • OSBuilder New-OSBTemplate
      • OSBuild Templates
    • Guides
      • OSBuild Arcade
        • Frogger
      • OSBuild Templates
      • OSBuild Registry
      • Windows 7 SP1
        • Import OSMedia
        • Download Updates
        • NVMe Hotfix
        • Update OSMedia
        • ISO Testing
      • Windows 10 1809 RSAT Capability
      • registry
        • OSBuild Registry REG
          • Certificates
        • OSBuild Registry XML
    • The Basics
      • Requirements
      • Installation
      • Support
      • Get Started
      • Update OSBuilder
      • Import an OS
      • OS Information
      • Update an OS
      • Update an OS (Process)
      • Create External Media
        • Create an ISO
        • Create a USB
      • Create an OSBuild
Powered by GitBook
On this page
  • Create a Blank OSBuildTask
  • Create a Templates Directory
  • Create a Global Template
  • Test Global Settings
  • OS Specific Template
  • Wrapping Up

Was this helpful?

  1. Docs
  2. Recycle Bin

OSBuild Templates

PreviousOSBuilder New-OSBTemplateNextGuides

Last updated 5 years ago

Was this helpful?

​

My previous version used an Enabled subdirectory, this is no longer used and Templates should be moved to C:\OSBuilder\Templates

Language Settings should be working now. Let me know your results!

So I had this idea for creating some type of Template for OSBuilds that will be used for every OSBuild that gets created. I had planned on creating a new function called New-OSBTemplate to do just this. You can read all about that here

Scratch the idea of a new function

Hidden in OSBuilder 19.1.20 is a pre-release method to do just this, but much easier than a separate function. Let me get some warnings out of the way

OSBuild Templates are for testing only! Things will probably change when things are officially released

Language Features are not processed for the time being

Create a Blank OSBuildTask

Start by creating a New-OSBuild Task without any settings

This can easily be validated by using the task in New-OSBuild

Create a Templates Directory

Create a Templates\Enabled directory in your OSBuilder Home. This path will typically be C:\OSBuilder\Templates

My previous version used an Enabled subdirectory, this is no longer used and Templates should be moved to C:\OSBuilder\Templates

Create a Global Template

A Global Template is one that will be applied to every OSBuild that is processed, so it is important to select items that are not OS specific like PowerShell Scripts (Appx and Features are OS specific, so don't pick those). Make sure the word Global is in the TaskName

Here you can see my complete Task with non-OS Specific Settings

Move this Task to C:\OSBuilder\Templates

My previous version used an Enabled subdirectory, this is no longer used and Templates should be moved to C:\OSBuilder\Templates

Test Global Settings

To test the Global Settings, run New-OSBuild and select the BLANK Task

After a few seconds, the Global Template should be picked up, and the results will be displayed. Congratulations, you have now created and applied your first Template

OS Specific Template

Creating an OS Specific Template is just as easy. I want to make one for Windows 10 x64 1809 to remove some Appx Provisioned Packages

New-OSBuildTask -TaskName "Windows 10 x64 1809 Appx" -RemoveAppxProvisionedPackage

So in this Task, those are the only things I set

After moving this Task into the Enabled Templates it will be processed every time I create an OSBuild with this Operating System. When I do, these Appx Provisioned Packages will be removed

Operating Systems are grouped by OSMedia Family, so when a Template is not Global, it uses this to determine if the Operating System is a match. In the case of this Server OS, it does not match the Windows 10 x64 1809 Appx Template, and it is skipped

Wrapping Up

Have fun playing with this new feature, and make sure to give some feedback because I keep hearing crickets!