Check the availability of a domain in a selected Office 365 region
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
Test-DomainAvailability.ps1

README.md

Test-DomainAvailability.ps1

Check the availability of a domain in a selected Office 365 region.

Description

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

Parameters

DomainName

The domain name you want to verify. Example: example.com

LookupRegion

The Office 365 region where you want to verify the domain. Currently implemented: Global, Germany, China

Examples

Test-DomainAvailability -DomainName example.com 

Test domain availability in the default region - Office 365 Global

Test-DomainAvailability -DomainName example.com -LookupRegion China

Test domain availability in Office 365 China

Note

THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.

TechNet Gallery

Download and vote at TechNet Gallery

Credits

Written by: Thomas Stensitzki

Stay connected:

For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos