Test Office 365 Domain Availability

Office 365Microsoft AzureDescription

Using this script you can test the domain availability in Office 365 and Azure AD. As there are different closed Office 365 and Azure AD regions you need to test per dedicated closed Office 365 region.

Regions currently implemented:

  • Global
    This is the default public Office 365 cloud
  • Germany
    This is the dedicated Germany Cloud offering aka Office 365 Germany
  • China
    This is the Office 365 region hosted by VIANET21

The script queries the login URI for the selected Office 365 region.

The response contains metadata about the domain queried. If the domain already exists in the specified region the metadata contains information if the domain is verified and/or federated.

 Load function into your current PowerShell session:

. .\Test-DomainAvailability.ps1


# Test domain availability in the default region - Office 365 Global
Test-DomainAvailability -DomainName example.com 

# Test domain availability in Office 365 China
Test-DomainAvailability -DomainName example.com -LookupRegion China

Version History

  • 1.0, Initial community release


Additional Credits


%d Bloggern gefällt das: