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:
This is the default public Office 365 cloud
This is the dedicated Germany Cloud offering aka Office 365 Germany
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:
# EXAMPLE# Test domain availability in the default region - Office 365 GlobalTest-DomainAvailability -DomainName example.com # EXAMPLE# Test domain availability in Office 365 China Test-DomainAvailability -DomainName example.com -LookupRegion China
- 1.0, Initial community release
- Download and follow at Github: https://github.com/Apoc70/Test-DomainAvailability
- Download at TechNet Gallery: https://gallery.technet.microsoft.com/Test-Office-365Azure-AD-5301c105