Report · 2 tools

Export Windows Autopilot devices with group tags

Summary

Exports every Autopilot device with serial number, model, group tag and profile assignment status. Use it to check readiness before a device migration and to find devices still registered in the old tenant.

Implementation

Choose your tool. Your choice is remembered on other samples.

Microsoft Graph PowerShell
Connect-MgGraph -Scopes DeviceManagementServiceConfig.Read.All -NoWelcome
Get-MgDeviceManagementWindowsAutopilotDeviceIdentity -All |
  Select-Object SerialNumber, Manufacturer, Model, GroupTag, EnrollmentState,
    DeploymentProfileAssignmentStatus, LastContactedDateTime, AzureActiveDirectoryDeviceId |
  Export-Csv .\autopilot-devices.csv -NoTypeInformation

Prerequisites

  • Graph scope DeviceManagementServiceConfig.Read.All

Output

CSV of Autopilot devices.

Related answers

Contributors

AuthorRole
Priyanshu UpadhyaySolution Architect, Microsoft 365 and Azure
Disclaimer. These samples are provided as is, without warranty of any kind. Read and test every script in a non-production tenant before you run it, and run reports before any command that changes or deletes data.