All pages
Powered by GitBook
1 of 10

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Named Templates

OSD 23.5.15.1+ Updated May 15, 2023

There may come a time when you need to create multiple OSDCloud Templates. I'll get into this further in the next few pages, but let's cover the basics here

-Name

To create a named OSDCloud Template, simply use the Name parameter

New-OSDCloudTemplate -Name 'My New Profile'

Get-OSDCloudTemplate

When you create a new OSDCloud Template, that will be the one that gets used by default going forward, until it is changed. To find out what your current OSDCloud Template is, use this function

Get-OSDCloudTemplateNames

This function will return all the OSDCloud Templates that have been registered

Set-OSDCloudTemplate

This function will If you have more than one OSDCloud Template, you can change between OSDCloud Templates using this function and the Name parameter

By the way, there is Tab-Complete to make your life easier

PS C:\> Get-OSDCloudTemplate
C:\ProgramData\OSDCloud\Templates\My New Profile
PS C:\> Get-OSDCloudTemplateNames
default
My New Profile
PS C:\> Set-OSDCloudTemplate #without params, returns to default
C:\ProgramData\OSDCloud

PS C:\> Set-OSDCloudTemplate -Name 'My New Profile'
C:\ProgramData\OSDCloud\Templates\My New Profile

PS C:\> Set-OSDCloudTemplate -Name default
C:\ProgramData\OSDCloud

Logs

OSD 23.5.15.1+ Updated May 15, 2023

If you are a fan of logs, you'll enjoy reading through these. If you have issues creating your OSDCloud Template make sure you go through these first. They are here for a reason ... and to audit everything that's been done to your WinPE

References

Languages

OSD 23.5.15.1+ Updated May 15, 2023

-Language

You can add additional languages to your WinPE by using the Language parameter. In my example, I used the ADK winpe.wim and added Spanish and French to my English US WinPE so I gave a Name that will help me identify the added languages

New-OSDCloudTemplate -Name 'ADK en es fr' -Language es-es,fr-fr

-SetInputLocale

This parameter allows me to set the default keyboard to something else, like English (US) Dvorak

-SetAllIntl

Finally, I can change all the International Defaults to one of the added Languages using this parameter. This will make the following changes

  • UI language

  • System locale

  • User locale

  • Input locale

New-OSDCloudTemplate -Name 'ADK en Dvorak' -SetInputLocale '0409:00010409'

ISO Boot Media

OSD 23.5.15.1+ Updated May 15, 2023

Just a quick note, every time you make a new OSDCloud Template, ISO's are automatically generated for you to test with right away and located in the root of the OSDCloud Template

OSDCloud_NoPrompt.iso will skip this message below and boot straight to WinPE

OSDCloud.iso

Public Content

OSD 23.5.15.1+ Updated May 15, 2023

I really enjoy having Microsoft DaRT in my WinPE so I can use Explorer, but I also share out my ISO's sometimes and I can't really do that as Microsoft DaRT is licensed. The way I get around this is by adding the word 'Public' in the Name and DaRT won't be added. This makes it easy to share out some of my work and not forgetting about breaking the Microsoft rules

New-OSDCloudTemplate -Name Public
New-OSDCloudTemplate -Name 'Public WinRE' -WinRE

Cumulative Updates

OSD 23.5.15.1+ Updated May 15, 2023

I've added the ability to apply a Cumulative Update to an OSDCloud Template due to the Secure Boot vulnerability. The next two links give some details on the issue

Download the Cumulative Update

Start by downloading the update from Microsoft Update Catalog and specifying the path to the downloaded update. Start by downloading the x64 version at this link if you are using the ADK for Windows 11 version 22H2

Apply the Cumulative Update

Once you have the update downloaded, use the CumulativeUpdate parameter and supply the Path to the downloaded MSU. In the example below I applied this in my default OSDCloud Template as this will be the one I use the most

  1. Cumulative Update is applied

  2. Updated Windows Information is displayed

  3. Boot files are updated

  4. DISM Component Cleanup is run

Apply the WRONG Cumulative Update

It's absolutely possible to apply the wrong Cumulative Update for WinPE, so make sure you understand that the Cumulative Update that you download must match your ADK. So if you are using the ADK for Windows 11 version 22H2, you need the Windows 11 22H2 x64 Cumulative Update

  1. Cumulative Update is applied

  2. Updated Windows Information is displayed. In this case, the UBR did not change

  3. Warning is displayed that the UBR has not been changed. The Boot files will not be updated

  4. DISM Component Cleanup is run

I'm not properly staffed to answer individual questions about which Cumulative Update you need for the ADK you have installed. If this is not something you can resolve on your own, then you should probably wait for updated Media from Microsoft that already has the Secure Boot updates applied

The Code

If you are interested in reviewing how this works, here is a snipped from the New-OSDCloudTemplate function

WinRE WiFi

OSD 23.5.15.1+ Updated May 15, 2023

In addition to using the winpe.wim that is in the ADK, you can also create an OSDCloud Template using WinRE

-WinRE

To do this, use the WinRE parameter. The benefit of using WinRE is you gain Wireless support. One thing you need to remember is that the ADK you are using needs to match your running OS, so if your OS is Windows 11 22H2, you need to use the ADK for Windows 11 22H2. Finally, make sure you use the Name parameter to keep things tidy

In my example below, you can see the WinPE-WiFi Packages that come with WinRE

OSDCloud Template

OSD 23.5.16.2+ Updated May 18, 2023

Now that you have your Machine Configuration complete, the next thing to do is to create an OSDCloud Template. This is called a Template as it will be used to create multiple OSDCloud Workspaces (multiple variations). You'll understand why this is needed over the next few pages

New-OSDCloudTemplate

New-OSDCloudTemplate -Name WinRE -WinRE

Additional Information

This function requires elevated Admin Rights

The default OSDCloud Template exists at C:\ProgramData\OSDCloud. You can create one here using the following command

Once you run this command, an OSDCloud Template will be created from the Windows ADK, there's really nothing to it. If you want to learn more, go through the next few pages

New-OSDCloudTemplate

Universal WinPE

OSDCloud Template contains a Universal WinPE that can be used with Microsoft Deployment Toolkit and Configuration Manager

If you were to boot the OSDCloud Template, you will see it looks virtually identical to the ADK WinPE

Universal WinPE Configuration

  • wgl4_boot.ttf is applied to Media to fix bad display resolution in WinPE UEFI

    • .\Media\boot\fonts\wgl4_boot.ttf

    • .\Media\efi\microsoft\boot\fonts\wgl4_boot.ttf

  • ADK Packages are installed for .NET and PowerShell support

  • Curl.exe is added to $MountPath\Windows\System32

  • Setx.exe is added to $MountPath\Windows\System32

  • WinPE PowerShell Execution Policy is set to Bypass

  • PowerShell Gallery support is added

    • System Variables are added for APPDATA and LOCALAPPDATA

    • PackageManagement

    • PowerShellGet

  • Microsoft DaRT is added to WinPE from C:\Program Files\Microsoft DaRT\v10\Toolsx64.cab

    • WinPE winpeshl.ini is removed

    • Microsoft DaRT Config is added from C:\Program Files\Microsoft Deployment Toolkit\Templates\DartConfig8.dat

  • Console Registry Changes are applied to mounted Registry (ForceV2, Buffers)

  • On Screen Keyboard

As you can see, nothing OSD, OSDCloud, or OSDeploy has been added to the boot.wim. This can easily be copied back into ADK for MDT or Config Manager (make a backup of you ADK winpe.wim)

On Screen Keyboard

Microsoft DaRT

Requires "C:\Program Files\Microsoft DaRT\v10\Toolsx64.cab" and "C:\Program Files\Microsoft Deployment Toolkit\Templates\DartConfig8.dat"

How to manage the Windows Boot Manager revocations for Secure Boot changes associated with CVE-2023-24932 - Microsoft Supportsupport.microsoft.com
Build a WinPE with wireless support - MSEndpointMgrMSEndpointMgr
Logo
Logo
OSD/Public/OSDCloudSetup/OSDCloudTemplate.ps1 at a8547e4868a9ff99fe7880fea52158ee5ff7642f · OSDeploy/OSDGitHub
Helpers/WirelessConnect at master · okieselbach/HelpersGitHub
Microsoft Update Catalogwww.catalog.update.microsoft.com
Logo
Update Windows installation media with Dynamic UpdateMicrosoftLearn
Logo
Logo

Build Process

OSD 23.5.15.1+ Updated May 15, 2023

The next few screenshots will detail the steps that are needed to make OSDCloud work

Initialize

  1. Start writing the PowerShell Transcript

  2. Mirror the ADK Media directory to the OSDCloud Template

  3. Copy the ADK winpe.wim to the OSDCloud Template boot.wim

  4. Mount the boot.wim

  5. Mount the WinPE registry to get the WinPE Info

ADK Packages

  1. Inject ADK Packages for PowerShell functionality

  2. Save the Windows Image

Tweaks

  1. Copy some helper files from the running OS

  2. If MDT is installed, add the Dart Configuration

  3. If Microsoft Dart is installed, inject the Tools

  4. Save the Windows Image

Packages

  1. Display the installed Windows Packages

Complete

  1. Dismount the Windows Image

  2. Export the Boot.wim to compress the file

  3. Create empty configuration directories

  4. Create the ISOs

Set the WinPE PowerShell ExecutionPolicy

  • Enable PowerShell Gallery support

  • Remove winpeshl.ini if it is present

  • Change some settings for a better Command Prompt experience

  • Set the OSDCloud Template to the new path

  • Stop writing the PowerShell Transcript

  • OSD/Docs/New-OSDCloudTemplate.md at master · OSDeploy/OSDGitHub
    Online Help
    Logo