Modified on: Sat, Jun 7, 2025 5:53 PM
Verifying laptop is in/not in Autopilot Devices
After verifying the laptop isn't in Autopilot by going to:
https://intune.microsoft.com/?ref=AdminCenter#home
Click on Devices, Click on Windows, Click on Windows Enrollment, Click on Devices under Windows AutoPilot, use the search to find the Serial Number.
Make sure computer is not in the Devices area of Intune.
Prep a USB stick for the Hash retrieval
On your laptop, open File Explorer. On the home directory of a USB stick, right click and New and select Text Document.
In this document, copy and paste in the following text WITHIN THE QUOTES:
"@ECHO OFF
echo Enabling WinRM
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command Enable-PSRemoting -SkipNetworkProfileCheck -Force
echo Gathering AutoPilot Hash
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command %~dp0Get-WindowsAutoPilotInfo.ps1 -ComputerName $env:computername -OutputFile %~dp0compHash.csv -append
echo Done!
pause"
Click the File menu, choose Save As. In the pop up window, in the file type dropdown, choose All Files. Name the file GetAutoPilot.cmd.
Copy this script file onto the home directory of your USB drive as well: Get-WindowsAutoPilotInfo.ps1
Get hash off laptop
Power on the laptop. Hold F1 immediately after powering on and go into the laptop's BIOS.
When in the BIOS, go to the Security tab and toggle off Secure Boot.
Hit the F10 key and select Yes to save changes and exit BIOS.
The computer will restart. AutoPilot will start as long as a fresh install of Windows 11 is installed.
In the Autopilot menu, hit SHIFT + Fn + F10 if on a laptop and SHIFT + F10 if using a desktop keyboard.
Click into the Command Prompt window (or hit ALT + TAB twice) and type "D:".
This will bring you to your flash drive. Type "dir" and hit Enter to see what files are in the home directory of your USB drive.
Type the command "GetAutoPilot.cmd" and hit Enter. This will run the script. A file named compHash.csv will be created on the home directory of your USB drive.
Back to Intune (where you verified laptop didn't exist in the AutoPilot devices).
Click the Import option along the top.
Click the blue folder and navigate to the .csv file you put on the USB Drive.
If it correctly created, then you will see the following:
Click the Import button. (it will take a few minutes for it to show up as a searchable machine - give it 2-3 minutes, then refresh the page).