Modified on: Sat, Aug 2, 2025 2:10 PM

Verifying laptop is in/not in the Enrollment area under Devices


After verifying the laptop isn't ready for Autopilot by going here:


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


If hash collection errors out


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.



Collecting the computer's hash


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 "explorer" and hit enter.


Go to your flash drive and see if a compHash.csv file exists on your flash drive. If it exists, right click on it and delete it.



Right click on the file named GetAutoPilot.cmd and Run as Administrator. Click Yes.



It will ask if you trust this script, type r and hit enter. Hit any button to exit.




Go back to Intune on your laptop (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 below. 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).



Find the correct serial number and click Assign. For the computer name, put in the Serial Number. The Group Tag is KO-ITCE. Click Save.