☁️
OSDCloud.com
OSDeploy.comTwitter
  • About
  • Contributors
    • Damien Van Robaeys | MVP
    • Ákos Bakos
    • David Segura | MVP
    • Gary Blok
    • Jérôme Bezet-Torres | MVP
  • OSDCloud
    • Local Setup
      • OSDCloud Template
        • Build Process
        • Logs
        • Named Templates
        • WinRE WiFi
        • Public Content
        • Languages
        • Cumulative Updates
        • ISO Boot Media
        • Universal WinPE
      • OSDCloud Workspace
        • Get-OSDCloudWorkspace
        • Set-OSDCloudWorkspace
        • New-OSDCloudWorkspace
          • Restore from ISO
          • Restore from ISO URL
          • Restore from USB
        • Update-OSDCloudWorkspace
        • Configuration Files
      • OSDCloud WinPE
        • Default Wallpaper
        • Wallpaper
        • Drivers
        • PSModule
        • Startup
      • OSDCloud ISO
      • OSDCloud USB
        • New-OSDCloudUSB
        • Update-OSDCloudUSB
        • USB Drives
        • Secure USB Drives
      • 🚧OSDCloud VM
        • Get-OSDCloudVMDefaults
        • Get-OSDCloudVMSettings
        • Set-OSDCloudVMSettings
        • Reset-OSDCloudVMSettings
        • New-OSDCloudVM
    • Deployment
      • WinPE
        • Start-OSDCloud
          • OS Parameters
          • ZTI
        • Start-OSDCloudGUI
          • Parameters
          • Defaults
          • Global Variable
          • Customize
        • Start-OSDCloud Wrapping
      • First Boot
      • OOBE
      • Windows
  • Sandbox
    • OSDCloud
      • sandbox.osdcloud.com
      • WinPE Usage
      • OOBE Usage
      • Functions
    • OSDCloud Azure
      • az.osdcloud.com
    • WinPE Downloads
  • OSDCloud Automate
    • 🆕Basic Configuration
    • 🆕OSDCloudGUI Defaults
    • 🆕Autopilot
    • 🆕Provisioning
      • 🆕Windows Configuration Designer
      • 🆕MSI Application PPKG
      • 🆕Bulk Enroll PPKG
      • 🆕PowerShell Script PPKG
    • 🚧Scripts
  • OSDCloud Azure
    • Azure Setup
      • Azure Portal
        • Storage Accounts
        • Storage Containers
          • BootImage
          • DriverPack
        • Storage Access Control (IAM)
      • Infrastructure As Code
        • Prerequisites
        • Technicien
        • Workspace
        • Bicep
        • Terraform
        • Configure Azure
    • Deployment
      • Testing
      • OSDCloudRE Azure
    • Deep Dive
      • Cloud Functions and Scripts
      • Connect Azure in WinPE
      • Azure Tags
      • Log Files
  • Offline Deployment
    • ISO: Adding a WIM
  • Integration
    • ADK: Use the OSDCloud Boot.wim
    • MDT: Use the OSDCloud Boot.wim
    • MDT: Add OSDCloud WinPE Drivers
    • MDT: Use OSDCloud DriverPacks in a Task Sequence
    • OSDCloud IPU
      • Windows In-place Upgrades
      • Windows Media Download
  • Archive
    • 💡Tips
      • 🆕Media Cleanup
      • Firmware Update
      • Quick Setup
    • 🌎Community
      • OSDCloud: The ZTI Way
      • OSDCloud - Image devices without need of infrastructure
      • Trying out Windows 10 Deployment with OSDCloud
      • Deploying Windows 10 to bare metal devices with just WinPE & internet
    • 💔Under Review
      • ISO
      • WIM
    • 🪦Recycle Bin
      • Release Notes
      • Enable-OSDCloudODT
      • Deploy
        • OOBE Phase
      • Guides
        • OSDCloud WIM
        • Custom OSDCloud
        • AutoPilot
          • AutoPilot Configuration File
          • AutoPilot in Audit Mode
          • AutoPilot in OOBE
        • WiFi
      • OOBE
        • Start-OOBE.settings
        • Start-OOBE.wifi
        • Start-OOBE.autopilot
      • Concepts
        • K.I.S.S.
        • OSD Disks Logically
        • Office365 Specialize
        • Specialize DriverPacks
        • Model Reference Image
        • MDT OSDCloud DriverPacks
        • MDT DriverPacks
      • Blob SAS URL
      • Storage Containers (Public)
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. OSDCloud
  2. Deployment
  3. WinPE

Start-OSDCloud Wrapping

OSDCloud is heavily variable driven, similar to a ConfigMgr Task Sequence.

PreviousCustomizeNextFirst Boot

Last updated 11 months ago

Was this helpful?

There are many variables in OSDCloud to control the process, similar to running OSDCloud with parameters to control a small set of the variables, you can script around Start-OSDCloud to configure so much more to get the exact zero touch scenario you're looking for.

Start-OSDCloud has about 60 variables in the Start-OSDCloud script beginning that are set, but along the way, several others can be used as well, which can be consumed by the OSDCloud engine which at last check, has about 130 variables.

At the start of the OSDCloud engine, it has a default set for these variables, then it looks at what you sent along the way with Start-OSDCloud, and it overwrites the defaults with the variables you set, but if you manually set any variables ahead of time using the global variable "MyOSDCloud", it will overwrite any previous variables with what you've set in that variable, I hope you're all tracking. Let's look at an example.

NOTE: See Start-OSDCloudGUI -> Global Variable for additional details

By Default, there is a $Global:OSDCloud variable with several sub keys, once of which is "OSVersion", which is set to "Windows 10" by default. If I run Start-OSDCloud with some parameters, I can see that a new Global variable $Global:StartOSDCloud is created with the information I just fed into it:

So now when OSDCloud runs, it will overwrite the defaults in $Global:OSDCloud with the ones in $Global:StartOSDCloud, updating $Global:OSDCloud.OSVersion from "Windows 10" to "Windows 11"

So, from this small example, you can see how OSDCloud overwrites the defaults with the variables you're setting along the way using parameters, but that's just one way to set them. The GUI? It's really just a front end that allows you to set several variables using a GUI interface. Each drop down and check box maps directly to a variable.

Now we're finally getting to the good part, this is how I have automated several unique experiences based on a simple PowerShell wrapper file that gets called. Lets look at some code examples. For instance, I have a Windows 11 wrapper script that sets several items and calls OSDCloud

#Variables to define the Windows OS / Edition etc to be applied during OSDCloud
$OSName = 'Windows 11 23H2 x64'
$OSEdition = 'Pro'
$OSActivation = 'Retail'
$OSLanguage = 'en-us'

#Set OSDCloud Vars
$Global:MyOSDCloud = [ordered]@{
    Restart = [bool]$False
    RecoveryPartition = [bool]$true
    OEMActivation = [bool]$True
    WindowsUpdate = [bool]$true
    WindowsUpdateDrivers = [bool]$true
    WindowsDefenderUpdate = [bool]$true
    SetTimeZone = [bool]$true
    ClearDiskConfirm = [bool]$False
    ShutdownSetupComplete = [bool]$false
    SyncMSUpCatDriverUSB = [bool]$true
    CheckSHA1 = [bool]$true
}

#Launch OSDCloud
Write-Host "Starting OSDCloud" -ForegroundColor Green
write-host "Start-OSDCloud -OSName $OSName -OSEdition $OSEdition -OSActivation $OSActivation -OSLanguage $OSLanguage"

Start-OSDCloud -OSName $OSName -OSEdition $OSEdition -OSActivation $OSActivation -OSLanguage $OSLanguage

When I trigger that script, it launches OSDCloud with the OS I want deployed, and presets several variables that are in the Global:MyOSDCloud variable.

You can see the variables in my script have been merged into the $global:OSDCloud variable

I keep a few variations of my wrapper scripts in GitHub, which I then call and based on hardware models, will also set additional variables, like for HP, I have it update TPM, BIOS, and run HPIA to update Drivers during Setup Complete.

As all of the available variables do change, I'm not going to list them here, but feel free to look at things in the code in the module to see a full list. If you'd ever like to see my of my examples, please reach out via Discord (WinAdmins) or X - @gwblok

OSDCloud Default Variables, OSVersion set to 'Windows 10'