This process is only for devices that are not currently enrolled in AutoPilot.
If you want to do this the easier way you can create a USB to enroll a device into AutoPilot folowing the steps in this ticket: Enroll Devices into Autopilot Automatically | Knowledge Base | Nelson Brothers IT Helpdesk
- Make sure all of your data is in OneDrive and synced, backed up, etc.
-
Open PowerShell as Administrator
Set-ExecutionPolicy Unrestricted - Type “Y” and press Enter (for policy change)
-
Run install script:
Install-Script -name Get-WindowsAutopilotInfo - Type "Y" and the press Enter (for script running)
- Type "Y" and then press Enter (for NuGet)
-
Type "Y" and then press Enter (for Untrusted repo)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -
Type "Y" and the press Enter (for Execution Policy Change)
Get-WindowsAutopilotInfo -Online - Sign-in with Intune admin account and wait for import process to complete
-
Reset your device
- If you are using Windows 11, use the reset my PC function
- If you are using Windows 10, use a USB drive to install windows 11 as a clean installation
Your device should now restart in the OOBE. If your device doesn't enroll in Intune (IE, you get asked for a computer name) please let Justin or Frank know.
If it's a new computer that didn't get pre-enrolled, here's the directions you'll need for getting to PowerShell and resetting without having to go through the full setup first:
- Once you're at the initial setup screen, press Shift+F10 to open a command prompt.
-
Enter this to run Powershell as an administrator:
Powershell Start-Process powershell –Verb runAs - Run the steps 4-12 in the section above.
-
When you're done with step 12, you can initiate the reset from powershell too:
systemreset -factoryreset
Full script for copy paste into PS:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Install-Script -Name Get-WindowsAutopilotInfo -Force
Get-WindowsAutopilotInfo -Online