Autopilot App Registration

David Segura and Mike Marable

This process will create an Azure Active Directory App Registration which you can then use with Get-WindowsAutopilotInfo to Autopilot register a device

I originally discovered this solution from MSP Automator

Get-WindowsAutoPilotInfo Snippet

Use the following snippets as an example of how to PowerShell register a device using Get-WindowsAutoPilotInfo and an App Registration

Splatting

Create an App Registration

Start by creating an App Registration in Azure Active Directory for Single Tenant. The name really doesn't matter, but be descriptive

API Permissions

The following API permission need to be set to allow Autopilot Registration with Get-WindowsAutopilotInfo. You will need to Grant admin consent for your App Registration

Manifest

It's much easier to edit the requiredResourceAccess configuration in the App Registration Manifest by copying what I have here

Certificates & secrets

Create a new Client secret and copy the Value

PowerShell Script

Gather your Application ID, and Tenant ID. Those will be used as values to pass to Get-WindowsAutopilotInfo

Get-WindowsAutoPilotInfo

With all the proper values in place, you can compose a PowerShell script to register an Autopilot Device. This example has a GroupTag of Enterprise

Key Vault

You can convert the PowerShell script to an Azure Key Vault Secret by copying the script to the Clipboard (yes, I know the screenshot needs to be updated), and yes you will have to create the KeyVault separately.

OOBE

You can now register a device in Autopilot with the following command if you have a KeyVault set

OSDeploy is sponsored by Recast Software and their Systems Management Tools

Sponsored by Recast Software

Last updated