to upload a computer hash to Intune during OOBE(Win11) or to re-upload from a working profile.
you can run this batch script, (it's run a few PowerShell commands (written by Microsoft)) and ask for an Intune administrator account credentials.
then it uploaded your tenant.
(replace the <YOUR_AUTOPILOT_SECURITY_GROUP> with the name of your autopilot security group.
or remove the "-AddToGroup" switch to only upload without assigning to any group.
Echo OFF
@Echo Installing PS NuGet...
@PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
@Echo Installing Get-WindowsAutopilotInfo PS Script...
@PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command Install-Script -name Get-WindowsAutopilotInfo -Force
@Echo Uploading Machin Hardware Hash to Intune AutoPilot...
PowerShell.exe -ExecutionPolicy Unrestricted "& 'C:\Program Files\WindowsPowerShell\Scripts\Get-WindowsAutoPilotInfo.ps1' -Online -AddToGroup "Autopilot_Computers_Assignments"
@Echo
@Echo Done!
@Echo ==========================================================================================================================
@Echo
@Echo This device should be Added to Intune AutoPilot and Assigned to the "<YOUR_AUTOPILOT_SECURITY_GROUP>" Security Group,
@Echo and assigned an Installation Policy associated with this Security Group
@Echo
@Echo Please Note the SERIAL NUMBER of this computer, You will need it to Assign the Computer to the Employee
@Echo
WMIC BIOS Get SerialNumber
Timeout /T 4
@Echo
@Echo ==========================================================================================================================
@Echo
@Echo PRESS ANY KEY, OR THIS COMPUTER WILL RESTART IN 30 SECONDS.
@Shutdown /R /T 30
Pause >nul
@Shutdown /A
@Echo Restart Aborted.