Everybody is talking about Windows Autopilot, this blog is not about what autopilot is but on how to get that hardware information for future use with Windows Autopilot as part of the OSD deployment process with Microsoft Deployment Toolkit.
Windows Autopilot will first be really great when we can deliver a brand new device directly to the end user, but for now the IT department needs to unbox the devices and do some manual work. This example is for a IT department that want to do a Windows Autopilot POC or they know that Windows Autopilot is going to be used in the near feature.
Prerequisite for collecting hardware information:
- Windows 10 1703 or later
- Harvest hardware hash in full OS
You can use Michael Niehaus’s script from GitHub or you can create your own.
There is different ways of doing this with MDT – personally I like to run custom scripts as and application – so that what I will do in this example.
First you create a application in MDT
Select Application with source files
- Publisher: Microsoft
- Application Name: Get-WindowsAutopilotInfo
Point to where the script is downloaded
Specify the name of the directory that should be created
Command line:Â powershell -executionPolicy bypass -file “Get-WindowsAutoPilotInfo.ps1” -OutputFile \\vmdt01\autopilot$\MyComputer.csv -Append
Note: Outputfile need to point to a place where the MDT process have write access
Click Next
Click Finish
Add a application in your MDT Task Sequence
Select the Microsoft Get-WindowsAutoPilotInfo application
Important : Hardware hash is only available in WMI in full OS – so you need to run the application in full OS and not in WinPE
Now you are ready to deploy Windows 10 and collect the hardware information used with AutoPilot.
After the deployment you have collected the information you need for AutoPilot and are ready to upload in Microsoft Store for Business
Read more about Windows Autopilot here:
Tip of the Day: Windows AutoPilot Links from an MVP and more!
Gather Windows 10 AutoPilot info in Azure Blob Storage during wipe and reload
Hey Per great article as always! I like your work very much! Keep going 🙂
I wrote a similar article some time ago.
I combined it with Azure Blob Storage
https://oliverkieselbach.com/2017/11/16/gather-windows-10-autopilot-info-in-azure-blob-storage-during-wipe-and-reload/
If the output file location is on a server other than the MDT server, you may need to map a drive to it first (unless the local admin account password is the same as the server’s admin account password, which would generally be a bad thing). MDT includes the ZTIConnect.wsf script that makes that easy.
Should the hardware ID for the same machine always be the same?
It’s effectively the same, but each time it is generated the actual value will change because it includes a timestamp of when the hash was generated.
Could I actually do this through intune and return the results to an online location? I have some devices in intune that are not in autopilot yet and I don’t have physical access to them. It would be great through deploy the script have it install, run and return the CSV to online location like a publicly shared onedrive, but the link would then only be known to the script.
hp profesional pcs can be received with the hash file directly when ortered via the entreprise route (not from stock of a distributor)
GitHub link returns a 404.
New link should be: https://www.powershellgallery.com/packages/Get-WindowsAutoPilotInfo/1.3
It’s better to use a version-independent link so it always redirects to the latest version, e.g. https://www.powershellgallery.com/packages/Get-WindowsAutopilotInfo.