Skip to main content

Initialize Windows Autopilot Registration

Summary

Automates Windows Autopilot registration by deploying and executing the Get-WindowsAutopilotInfo script with Azure AD application credentials.
The script collects device information and uploads it to Microsoft Intune (Autopilot service).
It installs the latest Get-WindowsAutopilotInfo PowerShell module from the PowerShell Gallery and runs it using the specified Azure AD credentials (AppId, TenantId, AppSecret) for authentication.

References

Requirements

  • PowerShell v5+
  • Microsoft Entra App Id (Application (client) ID), Tenant Id (Directory (tenant) ID), and App Secret (Client Secret ID Value) with the following permissions assigned:
    • DeviceManagementServiceConfig.ReadWrite.All
    • DeviceManagementManagedDevices.ReadWrite.All
    • Device.ReadWrite.All
    • Group.ReadWrite.All
    • GroupMember.ReadWrite.All

File Hash

File Path: C:\ProgramData\_automation\Script\Initialize-WindowsAutopilotRegistration\Initialize-WindowsAutopilotRegistration.ps1
File Hash (Sha256): 96A578FE452AB96F9E132FDDFBB492421D8EC7583B5AB12281A7C7F50C508F13
File Hash (MD5): D0BA87292EE63DE91C97631B5E798739

Sample Run

Image1

Client-Level EDFs

NameRequiredTypeSectionMaskedEncryptedDescription
Application [client] IDTrueTextIntune EnrollmentTrueTrueThe Application (client) ID of the Azure AD app used for authentication.
Client Secret ID ValueTrueTextIntune EnrollmentTrueTrueThe client secret value generated for the Azure AD app, used for secure authentication.
Directory [tenant] IDTrueTextIntune EnrollmentTrueTrueThe Directory (tenant) ID of the Azure AD tenant where the app is registered.

Image2

Output

  • Script Logs