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
- Get Device Information (Hardware Hash) for Local Device
- Get Hardware Hash for Remote Device
- Get Hardware Hash for Multiple Remote Computers (Input from text file)
- Get Device Information for Multiple Remote Devices ( Input from csv file)
- Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from SCCM Collection)
- Get Device Hardware Hash Details From SCCM
- Related Posts:
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.
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).
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.
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.
- Click on the Query tab.
- Click on Community hub icon on the top right corner. Wait for the list. It may take sometime.
- Click on Get Autopilot CSV info script
- You will see the script in query editor
- Click on Run Query
- You can see the result in Result pane
- Windows 10 Autopilot Deployment Guide | Intune
- Intune – Configure Enrollment Status Page (ESP)
- Intune – Windows 10 MDM- Basic troubleshooting
- Bulk enrollment of Windows 10/ 11 Device to Intune using Provisioning Package
- Enroll Windows 11 Device to Intune through Azure AD Join method
- Windows 11 enrollment with Provisioning package failed with error code 0x800700b7
- How to Obtain Hardware Hash for Manually Registring Devices with Windows Autopilot
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.