The goal of this script is to help with the import process of a device into AutoPilot and simplifying this by using a User Interface (GUI). You will be able to select a Group Tag if you use them and the script will reboot after the deployment profile was successfully assigned. It will also help to troubleshoot possible Network requirements by running a connectivitiy check. This GUI uses the Powershell Script Get-WindowsAutoPilotInfo of Michael Niehaus.
Blog post with additional infos: https://ugurkoc.de/autopilot-import-gui/
Here is the link to Powershell Gallery where you will find the source code. This is the Script which will be downloaded if you run "Install-Script Get-WindowsAutopilotImportGui" which is the same as the .ps1 file you find in this repository.
Attention: This GUI does not work in WinPE because WinPE does not support Powershell natively.
Step by Step:
- In OOBE: Start the Command Line by simultaneously pressing Shift + F10.
- Open Powershell by typing in Powershell.
- Run "Set-Executionpolicy RemoteSigned"
- Run "Install-Script Get-WindowsAutopilotImportGUI"
- Run "Get-WindowsAutopilotImportGUI"
- Done. See below for Walkthrougs in three different scenarios.
The third step is particulary important to tell Powershell to trust the downloaded script from step four. The Executionpolicy in Powershell is a security layer to block malicious scripts. By default the executionpolicy is set to Restricted which we have to change to successfully run our script. There are multiple options but we will use RemoteSigned. This way Powershell still has the security layer by only trusting signed scripts which this is by downloading it from PowerShell Gallery.