Whilst Microsoft have fixed the official script and module, unlike a lot of their scripts and documents, it does not seem to live anywhere public so we cannot make changes for review.
Version 2.0 just released with new parameters:
-wipe (Sends an Intune wipe to Intune managed devices, such as if you are shifting from hybrid to AAD)
-sysprep (Sends a sysprep OOBE reboot command)
Version 3.0 now supports both PowerShell Graph SDK v1 and v2
With that in mind, I have renamed and changed the GUID on my versions to create a community script and module with the names:
get-windowsautopilotinfocommunity and WindowsAutopilotIntuneCommunity
The source files can be found here:
And on the PowerShell Gallery:
Install-Script -Name get-windowsautopilotinfocommunity
Install-Module -Name WindowsAutopilotIntuneCommunity
These are community scripts, please send feature requests, bug fixes, anything at all, I will attempt to keep on top of all changes.