Windows Autopilot

Updated WindowsAutopilotIntune module posted

As I have been working my way through an e-mail backlog, I have been making adjustments to the WindowsAutopilotIntune module to address feedback and requests from those that contacted me.  The first request was to be able to get the same information as what you can see in the new Windows Autopilot deployment report (which I always struggle to find in the Intune portal – it’s under Devices –> Monitor –> Enrollment):


Like (almost) everything in the Intune portal, this same information is available via the Intune Graph API.  To make it easy to retrieve that, I added a new Get-AutopilotEvent cmdlet (remember to first install and import the WindowsAutopilotIntune module first, then connect to Intune using Connect-MSGraph):


If you want to browse the data, you can use “Out-GridView” instead of “Format-Table.”

Next, I made some changes to the Autopilot profile functions, to make sure they support all profile types (user-driven Azure AD Join, user-driven Hybrid Azure AD Join, self-deploying) and new properties (although one of those new properties is currently commented out as it relates to a private preview feature for Hybrid Azure AD Join over VPN).  You’ll see that you can now easily create new profiles of any type with the New-AutopilotProfile cmdlet (renamed from Add-AutopilotProfile as that didn’t quite fit the PowerShell naming standards):


And you can update existing ones (cheating in this case using a shortcut parameter to turn on every setting):


While I was making changes, I also added support for verbose logging to all the cmdlets, so if you add -Verbose you’ll be able to see the web service URIs and JSON payloads for each call to the Intune Graph APIs (if you care – I added that more for my own troubleshooting).

There is still some work to do to clean up the ESP functions, but I’ll tackle those at another time, after my eyes have recovered from a late night of testing…

Categories: Windows Autopilot