OSDCloud: The ZTI Way

04-16-2021 8:38 PM


Disclaimer: All information and content in this blog posts is provided without any warranty whatsoever. The entire risk of using this information or executing the provided content remains with you. Under no circumstances should David Segura, Microsoft, its author, or anyone else involved in the creation of these blog posts be held liable for any damage or data loss.
Knowledge: I assume that people who read this blog post have an general understanding of Windows ADK/PE, Windows 10 deployment, PowerShell and Windows Autopilot, so I won't be deep-diving into details about that in this post.
Update (04-16-2021): OSDCloud now support WiFi (kudos to Andrew), wallpaper and a more dynamic method to control Zero Touch, so I've updated my blog post with the new info.


In this blog post I'll be using OSDCloud created by David Segura to create a Zero Touch (ZTI) Windows 10 deployment experience, if you are not familiar with OSDCloud then get started here or take a look at these great blog post Part 1 and Part 2 by Mattias Melkersen which should prepare you for this blog post.
OSDCloud - The ZTI Way
You might know David Segura for his OSDBuilder project which is a awesome PowerShell module for Offline Servicing Windows Operating System Image.

Zero Touch (ZTI)

WHAT DOES ZTI STAND FOR? Zero Touch Installation (ZTI) - is a fully automated deployment solution that require no user interaction.
OK, so if you have followed the walkthrough of OSDCloud creation provided in the above link(s), you should now have a workspace containing AutoPilot profile(s), Boot Media and maybe a wallpaper.
OSDCloud - The ZTI Way
Now, let´s make the customizations that make it possible to automatically run OSDCloud with ZTI.
First we'll need to create a PowerShell configuration file and upload it to a online storage e.g. GitHub or a Webserver. This sample has been borrowed from David Segura
Write-Host -ForegroundColor Cyan "Starting SeguraOSD's Custom OSDCloud ..."
Start-Sleep -Seconds 5
#Change Display Resolution for Virtual Machine
if ((Get-MyComputerModel) -match 'Virtual') {
Write-Host -ForegroundColor Cyan "Setting Display Resolution to 1600x"
Set-DisRes 1600
#Make sure I have the latest OSD Content
Write-Host -ForegroundColor Cyan "Updating the awesome OSD PowerShell Module"
Install-Module OSD -Force
Write-Host -ForegroundColor Cyan "Importing the sweet OSD PowerShell Module"
Import-Module OSD -Force
#TODO: Spend the time to write a function to do this and put it here
Write-Host -ForegroundColor Cyan "Ejecting ISO"
Write-Warning "That didn't work because I haven't coded it yet!"
#Start-Sleep -Seconds 5
#Start OSDCloud ZTI the RIGHT way
Write-Host -ForegroundColor Cyan "Start OSDCloud with MY Parameters"
Start-OSDCloud -OSLanguage en-us -OSBuild 20H2 -OSEdition Enterprise -ZTI
#Anything I want can go right here and I can change it at any time since it is in the Cloud!!!!!
Write-Host -ForegroundColor Cyan "Starting OSDCloud PostAction ..."
Write-Warning "I'm not sure of what to put here yet"
#Restart from WinPE
Write-Host -ForegroundColor Cyan "Restarting in 20 seconds!"
Start-Sleep -Seconds 20
wpeutil reboot
Copy the URL of the PowerShell file, we need it in a step further down below.
OSDCloud - The ZTI Way
Run PowerShell as administrator.
OSDCloud - The ZTI Way
So, in this elevated PowerShell session, we will now add support for WiFi and ZTI with the below command. Remember to replace the URL "" with your own.
Edit-OSDCloud.winpe -workspacepath C:\OSDCloud -CloudDriver Wifi -WebPSScript -wallpaper "C:\OSDCloud\Wallpaper\WinPE.jpg" -Verbose
If you need WinPE drivers just add manufacturer to the parameter -CloudDriver e.g. Dell or HP.
Do you need custom WinPE drivers? No problem! You can add them with this parameter -DriverPath <Path> e.g. C:\Temp\WinPE\Drivers
Note. The more you add to the boot media the bigger file you get - Just keep that in mind...
Now, create new ISO(s) with the below command.
New-OSDCloud.iso -workspacepath C:\OSDCloud
OSDCloud - The ZTI Way
OSDCloud - The ZTI Way
Mount the "OSDCloud.iso" or "OSDCloud_NoPrompt.iso" image to a Hyper-V Virtual Machine.
OSDCloud - The ZTI Way
Start the Virtual Machine, lean back and watch the magic of ZTI
OSDCloud - The ZTI Way
A special thanks go once again to David Segura and his team of contributors for their awesome dedication to the OSD-community! If you want to learn a lot about OSD please visit his blog here
If you have any questions regarding this topic, feel free to reach out to me. I am most active on Twitter!