Enrolling a device in autopilot is easy enough – most resellers will do it for you now (for a fee, obviously). But what if you forgot to ask? Or you reset an older device, and forgot to run the PowerShell script first? Never fear, you can enrol a device from the OOBE screen using PowerShell, and even install all the updates without needing to sign in. Interested? Read on…
- Connect a network cable to the device
- Boot the device to the Windows Out-Of-Box Experience (OOBE)
- Press FN-SHIFT-F10 to open a command prompt
- Run the following:
- Set-ExecutionPolicy Bypass -Scope Process
- Install-Script -Name Get-WindowsAutoPilotInfo
- Get-WindowsAutoPilotInfo.ps1 -Online -GroupTag *GroupTag* -AssignedUser *username* -Assign -Reboot
- You will need to install the nuget provider, just type “Y” and press enter.
- You will then be prompted to connect to your Microsoft account
- The script will enrol the device and reboot. This may take a few minutes.
But wait! Before you give the device to the user, why not use Powershell to ensure it’s got the latest updates?
To run Windows updates without enrolling the device:
- Press FN-SHIFT-F10 again to open a command prompt
- Run the following
- Install-Module PSWindowsUpdate
- Set-ExecutionPolicy Bypass
- Import-Module PSWindowsUpdate
- Reboot and repeat the last two commands until no more updates are found.
Leave a Reply