|

Gathering Existing Devices Windows Autopilot Device IDs

Share

Update 8/1/2020: Microsoft has updated their official blog post a number of times since this post to include automated ways from Intune and ConfigManager.

We have published a number of posts about what Windows Autopilot is and how to setup and test. Now that so many organizations have taken note of Modern Device Management advantages they want to know how to include those devices into the Windows Autopilot.

It needs to be clarified that Modern Devices Management in the context of Windows Autopilot, is comprised of three parts:

  1. Device Registration
  2. Device Enrollment
  3. Device Provisioning

This article relates to step 1) for existing devices within an organization. Specifically the question it is trying to answer is:

Is there a way we can generate the IDs without someone sitting down in front of hundreds / thousand of individual machines and manually starting the PowerShell script?

Here is high level steps what I have seen done out there:

Preparation

First, Download the Microsoft published Get-WindowsAutoPilotInfo PowerShell script.

Note: there are no specific dependencies needed to run the it works on Windows 10 and Windows 7 devices and it uses WMI to retrieve the information needed and it saves it to text file in csv format.

If you want to execute it everywhere, you will need to place the script on a network or shared location available to all target devices.

Alternatively you can prepare a software distribution package (in SCCM, Intune or similar) and deploy it to all target devices so it is present there.

Note: If you are trying to gather the hardware details remotely, you will need to make sure that the Windows Firewall enables access to WMI.  You can do this via Group Policy or manually. – Source: Dec 17, 2017 blog post from Michael Niehaus

Script Execution

For each device you want to gather the Windows Autopilot Device ID, execute the PowerShell script to generate the file with the unique device information.

By default the script will create the file on the location you are executing this from, but you use the -output switch to redirect the file. Something like this:

Get-WindowsAutoPilotInfo.ps1 -OutputFile C:\Windows\Temp\MyComputer.csv Copy / rename each file into a central location on your network

You now have a csv file with device ID and related information on each device.

Data Collection

If you chose to keep the data on the individual devices, then you need to collect the data from it and move it into a central location. You now can do this with a copy / rename commands and/or execute it from “pull data”  collection via SCCM .

Data Consolidation

Once you have collected the files for the devices you want, into a single location, the next step is to aggregate all the individual files into one single file: A PowerShell script to append files in directory should suffice.

 filename1.csv+filename2.csv+…filename.csv  

Note: as of version 1.1. of the Autopilot Script, there was a -Append switch that if you use in combination with the -outputfile switch, you could save some time ** IMPORTANT: be aware of file locking!

Register the Devices

Final step is to import into the Windows Autopilot Device Registration dashboard. You can do this by going into the dashboard, device registration click on the upload a file, select the one single file you just created.

Devices have been registered, but have not yet been enrolled into Intune.

will still need to do “all things” Intune to the freshly register devices, but you do not have to do until you are ready to  manage with MDM.

Alternatives and Improvements

Further Reading

Similar Posts