OSDCloud: The ZTI Way
04-16-2021 8:38 PM

BEFORE YOU BEGIN

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.

OSDCloud

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
1
Write-Host -ForegroundColor Cyan "Starting SeguraOSD's Custom OSDCloud ..."
2
Start-Sleep -Seconds 5
3
4
#Change Display Resolution for Virtual Machine
5
if ((Get-MyComputerModel) -match 'Virtual') {
6
Write-Host -ForegroundColor Cyan "Setting Display Resolution to 1600x"
7
Set-DisRes 1600
8
}
9
10
#Make sure I have the latest OSD Content
11
Write-Host -ForegroundColor Cyan "Updating the awesome OSD PowerShell Module"
12
Install-Module OSD -Force
13
14
Write-Host -ForegroundColor Cyan "Importing the sweet OSD PowerShell Module"
15
Import-Module OSD -Force
16
17
#TODO: Spend the time to write a function to do this and put it here
18
Write-Host -ForegroundColor Cyan "Ejecting ISO"
19
Write-Warning "That didn't work because I haven't coded it yet!"
20
#Start-Sleep -Seconds 5
21
22
#Start OSDCloud ZTI the RIGHT way
23
Write-Host -ForegroundColor Cyan "Start OSDCloud with MY Parameters"
24
Start-OSDCloud -OSLanguage en-us -OSBuild 20H2 -OSEdition Enterprise -ZTI
25
26
#Anything I want can go right here and I can change it at any time since it is in the Cloud!!!!!
27
Write-Host -ForegroundColor Cyan "Starting OSDCloud PostAction ..."
28
Write-Warning "I'm not sure of what to put here yet"
29
30
#Restart from WinPE
31
Write-Host -ForegroundColor Cyan "Restarting in 20 seconds!"
32
Start-Sleep -Seconds 20
33
wpeutil reboot
Copied!
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 "some-online-cloud-storage.com" with your own.
1
Edit-OSDCloud.winpe -workspacepath C:\OSDCloud -CloudDriver Wifi -WebPSScript http://some-online-cloud-storage.com/Win10-Enterprise-21H2-DA-DK.ps1 -wallpaper "C:\OSDCloud\Wallpaper\WinPE.jpg" -Verbose
Copied!
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.
1
New-OSDCloud.iso -workspacepath C:\OSDCloud
Copied!
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!
Last modified 6mo ago