Skip to main content
Register Autopilot Devices: Get-WindowsAutoPilotInfo
  1. Posts/

Register Autopilot Devices: Get-WindowsAutoPilotInfo

Michael Escamilla
Author
Michael Escamilla
Table of Contents

I’ve been working on rewiring my brain to understand how I go from Configuration Manager OSD, to the ‘pure cloud’ model of Autopilot and Intune.

So lets get some devices into Autopilot using the ‘Get-WindowsAutoPilotInfo’ where I first came aware of from Michael Niehaus blog.

More Information:

Assumptions:

  • You have Windows installed and are now sitting at the OOBE.

We’ll start from the OOBE of newly deployed machine.
#

OOBE

From the OOBE, Press (Shift+F10)
#

Shift-F10

Within cmd, type:
#

start powershell
start powershell

We need to set the execution policy within Powershell. From the Powershell prompt, type:
#

Set-ExecutionPolicy Bypass -Force
Set-ExecutionPolicy

Install the ‘Get-WindowsAutopilotInfo’ script from the PSGallery
#

Install-Script -Name Get-WindowsAutoPilotInfo
  1. When prompted, enter ‘Y’ to configure the PATH Environment Variable

  2. When prompted, enter ‘A’ to trust installing a script from the ‘PSGallery’

Install Get-WindowsAutoPilotInfo

Below is information on the ‘Get-WindowsAutoPilotInfo’ script
#

  • Most of the available Parameters
Get-WindowsAutoPilotInfo.ps1 [-Name] <String[]>] [-OutputFile <String>] [-GroupTag <String>] [-Append] [-Credential <PSCredential>] [-Partner] [-Force] [-Online] [-AddToGroup <String>] [-Assign] [-AssignedComputerName <String>]
  • Additional Information on what we will use
-Online [<SwitchParameter>]
     Add computers to Windows Autopilot via the Intune Graph API
-GroupTag <String>
     Specifies a tag for the device. Used for Automatic group assignments.
-AssignedComputerName <String>
     Specifies the computer name that should be assigned when Autopilot deploys the device
  • We will use the below example command to test. Modify the ‘-GroupTag’ and ‘-AssignedComputerName’ for your own needs (These Parameters are not required, use as needed).
Get-WindowsAutopilotInfo -Online -GroupTag "GroupTag" -AssignedComputerName "ComputerName"
Get-WindowsAutoPilotInfo

Authenticate and Approve Microsoft Graph permissions
#

  • A Microsoft Authentication prompt will appear. Use an account with permissions to import Windows Autopilot devices.
AuthPrompt
  • If you haven’t already, you will need to Accept the Microsoft Graph app Permissions for you organization.
GraphPermissionsAccept
  • After successfully authenticating, the process will start

    • The script will Import the Device first, then perform a Device Sync.

    • If you use the ‘-Assign’ Parameter, the script will wait for the assignment to complete.

ImportCompleted

View the Imported device in the Intune admin center
#

  • After the process has completed, you can now view the device from within the ‘Windows Autopilot devices’ portal within the Intune Admin Center.
IntuneConfirm
  • If you click on the Device row, you can see that the ‘Device name’ and ‘Group tag’ should be applied if you supplied it during import.
IntuneConfirmPanel

Restart the device to pull down the Autopilot Profile
#

shutdown -r -t 0
Autopilot_Restart

Success!
#

  • After the restart, the computer will check for updates.
    • During this process, the computer will download the Autopilot Profile, and then restart one more time.
CheckForUpdates
  • After the restart, the AutoPilot should be loaded And you should now see any branding that you might have configured for your tenant.
SucessLoaded