Hi everyone.
📢 Updated: 7/18/2023 – RegisterAutopilot.ps1 and get-windowsautopilotinfocommunity 3.0.4
In the past months, I’ve been sharing some ways to get devices registered into Windows Autopilot devices in Intune and I used the PPKG which is part of the Windows Configuration Designer. More information is here.
After my last post about the get-windowsautopilotinfocommunity.ps1 , provided by Andrew Taylor link1
I rushed to revisit how I’ve been registering Windows autopilot devices in Intune and I came up with the following simple idea and package format.
- registerautopilot.ps1 => the main PowerShell script called from PPKG using PowerShell.exe -ExecutionPolicy Bypass -File .\registerautopilot.ps1
- get-windowsautopilotinfocommunity.ps1 => the get-windowsautopilotinfocommunity.ps1 file called from the PPKG
or download using
Invoke-RestMethod -Uri https://raw.githubusercontent.com/andrew-s-taylor/WindowsAutopilotInfo/main/Community%20Version/get-windowsautopilotinfocommunity.ps1 -OutFile c:\temp\get-windowsautopilotinfo.ps1
or download from Powershell Gallery from here (file list) - Cmtrace.exe => the famous log viewer available here
where registerautopilot.ps1 would have the following structure
# Functions
# Logs requirements
# Date and time
# Gather Autopilot details
# Add the .\get-windowsautopilotinfo.ps1 community version requirements to not fail running it straight from PowerShell Gallery
# Registering Device in Windows Autopilot devices
# Sending Teams Notification to Teams Channel
Proceed with your PPKG creation
- download Windows Configuration Designer
- open Windows Configuration Designer
- create a new project “Default Device Registration” => all devices have GroupTag as empty (default autopilot deployment profile)
- create new item and give it the name “Default”
- at command file: add the registerautopilot.ps1 (locate the source files and select it)
- at command line: add primary context command as “PowerShell.exe -ExecutionPolicy Bypass -File .\registerautopilot.ps1”
- add dependency packages
- click on browse
- select get-windowsautopilotinfo.ps1
- select cmtrace.exe
- click add
- at RestartRequired: set to FALSE
- click EXPORT at the top level menu at Windows Configuration Designer (follow the wizard)
- copy PPKG file to USB flash drive and give it a try
massive deployment (physical devices)
-
- connect usb flash disk to the targeted computer for 5 seconds (it will do its work: import PPKG and run what’s in there, device should restart when it’s finished)
- go to next device
guided deployment
-
- share the PPKG file on a SharePoint site
- during OOBE
- press Shift + F10
- windows key + R
- msedge <enter> and follow its wizard
- go to SharePoint site
- download PPKG
- run from the downloads folder
- check c:\logs\ if required
- device should restart when it’s done
Cheers,
Thiago Beier