How to Obtain Hardware Hash for Manually Registring Devices with Windows Autopilot

To identify a device with Windows Autopilot, the device’s unique hardware identify (hardware hash) must be captured and uploaded to the service. This is usually first step when you want to provision a machine using Windows Autopilot. The hardware hash can be uploaded by manufacturer / reseller for new devices. However, hardware hash need to be collected manually for the devices which are already in corporate environment and not already enrolled into Microsoft Intune.

In this blog post, we will discuss about different ways to collect hardware hash from existing devices.

Related Post: Windows 10 Autopilot Deployment Guide | Intune

Get Hardware Hash Using Get-WindowsAutoPilotInfo.ps1 Script

The Get-WindowsAutoPilotInfo script uses WMI to retrieve properties needed for a devices to register with Windows autopilot. This script obtain hardware hash from local or remote devices. You can download PowerShell script (Get-WindowsAutoPilotInfo.ps1) from PowerShell gallery.

Get Device Information (Hardware Hash) for Local Device

To collect hardware hash for a local computer, copy the script on local computer and use the below command line. The script export hardware has in CSV file in current directory.

Get-WindowsAutoPilotInfo.ps1 -outputfile HWIDVM003.CSV

Get Hardware Hash for Remote Device

To get hardware hash for a remote computer, run the script with -ComputerName parameter.

Get-WindowsAutoPilotInfo.ps1 -ComputerName TESTDEVICE01 -OutputFile deviceinfo.csv

Get Hardware Hash for Multiple Remote Computers (Input from text file)

To get hardware hash for multiple remote computers, the input can be provided from a text file. The computers name should be provided in text file in below format.

Intune hardware hash input text file mulitple computer

Use the below command line to collect the hardware hash. The script will export the resultin CSV file in current directory.

Get-content .\Computers.txt | .\Get-WindowsAutoPilotInfo.ps1 -OutputFile deviceinfo.csv

Get Device Information for Multiple Remote Devices ( Input from csv file)

To get hardware hash for multiple remote computers, the input can be provided from a CSV file. The computers name should be provided in CSV file in below format. Please note that ComputerName column header is mandatory when you provide input from a CSV (Comma Seprated File).

Hardware hash CSV

CSV file format for Get-WindowsAutoPilotInfo.ps1

Use the below command line to collect the hardware hash. The script will export hardware hash in CSV file in current directory.

Import-Csv -path .\computers.csv | .\Get-WindowsAutoPilotInfo.ps1 -OutputFile deviceinfo.csv

Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from SCCM Collection)

The Get-WindowsAutopilotInfo script also accept the input directly from SCCM collection. To get hardware hash for members of SCCM collection, you need to get the list of collection members using Get-CMCollectionMember cmdlet and pass the input to Get-WindowsAutopilotInfo script.

Follow the below steps to get hardware hash for a member of SCCM collection. Similar to the input provided from CSV / Text file, this method also requires that machine is online as script will gather the information by connecting to remote computer WMI.

  • Open Windows Powershell with Local Administrator permission
  • Set execution policy to unrestricted (Set-ExecutionPolicy Unrestricted -Scope currentuser)
  • Import Configuration Manager Powershell Module (Import-Module ‘C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1’)
  • Chnage drive letter to SCCM site code ( e.g, CD P01)
  • Use below command to obtain hardware hash.

Get-CMCollectionMember -CollectionName “Test VMs” | D:\temp\Get-WindowsAutopilotInfo.ps1 -OutputFile D:\temp\deviceinfo.csv

Get Device Hardware Hash Details From SCCM

SCCM Report : Windows AutoPilot Device Information

The built-in SCCM report “Windows AutoPilot Device Information” pull out hardware hash for SCCM clients. SCCM collect these information as part of default hardware inventory and information already present in SCCM database.

Follow the below steps to get the details.

  • In Configuration Manager admin console, navigate to Monitoring / Reports and search “AutoPilot”.
  • From the result, select “Windows AutoPilot Device Information” report and Run the report.
  • Export the result to CSV file.

SCCM Report | Windows AutoPilot Device Information

ConfigMgr CMPivot Utility

CMPivot is in-console utility introducted in Configuration Manager version 1806. CMPivot allows SCCM admin to initiate a live query on select computers. The device must be online and accessible to collect the information using CMPivot tool.

Follow the below steps to collect hardware hash using CMPivot utility.

  • Launch Configuration Manager Admin Console
  • Navigate to device collection and select any device collection that you want to collect the Hardware hash.
  • Right-Click on Device collection and select Start CMPivot.

You will now see CMPivot application opened. Follow the steps mentioned below to open Get Autopilot CSV info script from Community hub and get hardware hash using that script.

  1. Click on the Query tab.
  2. Click on Community hub icon on the top right corner. Wait for the list. It may take sometime.
  3. Click on Get Autopilot CSV info script
  4. You will see the script in query editor
  5. Click on Run Query
  6. You can see the result in Result pane

Related Posts:

Subscribe to Techuisitive Newsletter

Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top