UPDATE: An up-to-date version of this blog can be found here: https://www.linkedin.com/pulse/windows-autopilot-ultimate-step-by-step-deployment-guide-robin-hobo/
In July, 2018, I wrote this blog about how to setup Windows Autopilot and add existing devices the quickest way. After publishing this blog the Get-WindowsAutoPilotInfo script has been updated several times by the author Michael Niehaus. New functionalities have been added to the scripts. Therefore Windows 10 devices can be added to Windows Autopilot even faster then described in my old blog.
Let’s see how you can add Windows 10 devices even faster to Windows Autopilot.
Turn on a new device. Connect to your WiFi network (if no LAN cable is connected) and after that press the SHIFT + F10 keyboard combination. This will open a command prompt.
Run Powershell
Run the following commands for creating a local “scripts” folder and downloading the Get-WindowsAutoPilotInfo script.
cd\ md scripts cd scripts Set-ExecutionPolicy -ExecutionPolicy RemoteSigned Save-Script -Name Get-WindowsAutoPilotInfo -Path c:\scripts
When asked to install and import the NuGet provider, type Y and press Enter
Optionally you can check if the script is downloaded in the folder by running the dir command.
Now I will run the script with the following (optional) parameters:
AssignedUser : If you want to assign this device directly to a user you can add this parameter followed by the UPN of the user (optional)
AssignedComputerName : To give this device a fixed name, for example the registered name in your CMDB. The device will keep this name, even after a factory reset. (optional)
Online : To directly add this device to the Autopilot services without creating an output file that needs to be imported manually
.\Get-WindowsAutoPilotInfo.ps1 -AssignedUser "User UPN Name" – AssignedComputerName "Fixed device name" -Online
In my case it will be the following command;
.\Get-WindowsAutoPilotInfo.ps1 -AssignedUser robin@futureworkplace.it – AssignedComputerName FUTUREWP-03 -Online
Sign in with your Azure Global Administrator account.
Scroll down
Select Consent on behalf of your organization (will appear only the first time) and click Accept
After authentication the devices information will be collected and imported to the Windows Autopilot services directly.
After 2 to 3 minutes (average) the devices is synced with the Windows Autopilot services.
The devices is now visible in the Microsoft Endpoint Manager admin center. As you can see it is already assigned to the user and have the fixed Device Name configured.
When the device is rebooted you see that Windows Autopilot is enabled. And since this device is assigned to an user, the user only has to enter his / her password.
Hi! Great job! How often are new functions added to scripts?
Is Global Admin required or is it just InTune Administrator?
Good read. Does consent require Global Admin or can an Intune Admin do the same?
That really wonderful Solution. I receive an Error. it needs WindowsAutoPilotIntune module
Brilliant! Is it possible to include a group tag in the script?
Yes use -GroupTag
Robin, just did this for 2 new devices that came in- you saved me hours of work- I used to put the script in, then wipe the machine!!
Keep these bits of magic coming 🙂
Hello! I’ve followed all the steps but when I turn the device on, it still asks for user to input their email. Any suggestions?
Can you check if the device is assigned to the user in the Intune console?
The user is assigned the device in the Intune console.
Yes, it does assign it to the user on Intune.