Have you ever found yourself in a situation where a Windows Autopilot device ends up registered in the wrong organization tenant? It's a scenario that's not uncommon, whether due to testing purposes, issues with an order, or even hardware replacements. If you have, you know the frustration it can bring. To make matters worse, sometimes the Autopilot profile fails to have proper branding, leaving you uncertain about the organization to which the device actually belongs.

I've been down this road several times myself, and I know Gannon has too.
You can find his explanation here:
Find the Tenant Where a Device is Autopilot Registered - SMBtotheCloud

To simplify the steps described by Ganon, I wrote a small script. Which does the same Registry reading for you.

I've even gone a step further and made this script available in the PowerShell Gallery for your convenience. So, no matter where you are or what device you're using (as long as it's connected to the internet), you can easily access and execute it.

To get your hands on this script, here's what you need to do:

1. Download the Script

First, open PowerShell as an Administrator. You can even do this during the Out-of-Box Experience (OOBE) phase if needed. Then, run the following command:

Install-Script -Name Get-AutopilotProfileInfoCode language: PowerShell (powershell)

This command will swiftly download and install the script on your device, making it ready for action.

2. Use the Script

Once you've successfully installed the script, you have two options for using it.

To display just the primary domain of the Organization / Autopilot profile, simply run the script without any parameters:

Get-AutopilotProfileInfoCode language: PowerShell (powershell)

This option provides you with a quick overview, helping you identify the primary domain associated with the Autopilot profile.

For a more detailed view, use the -All parameter to display all available information about the Autopilot profile:

Get-AutopilotProfileInfo -AllCode language: PowerShell (powershell)
Get-AutopilotProfileInfo -All

By utilizing this parameter, you'll gain deeper insights into the profile. Making it easier than ever to determine which organization the device is registered under.

So, the next time you're faced with the frustration of an Autopilot device in the wrong organization tenant, remember that there's a solution at your fingertips. With my script from the PowerShell Gallery, you can quickly and accurately identify the tenant where the device is Autopilot registered, bringing peace of mind and efficiency to your IT management tasks.