Add domains in Office 365 with Powershell

If you would try to add a new domain to your Office 365 tenant , using Powershell, the steps are ( of course after you install Windows Azure Active Directory Module for Powershell )

Step 1. Connect to your tenant
Get-MSolDomain ( this is just to verify which domaains are already attached to your tenant )

Step 2. Create a new Domain
New-MsolDomain -TenantId “customer_TenantId” -Name “FQDN_of_new_domain”

Step 3. Get domain verification key
Get-MsolDomainVerificationDNS -TenantId “customer_TenantId” -DomainName “FQDN_of_new_domain”

Step 4. Modify your DNS and wait for replication

Step 5. Confirm the domain
Confirm-MsolDomain -TenantId “customer_TenantId” -DomainName “FQDN_of_new_domain”

So far so good

But my question is:
Why a similar parameter ( Domain name ) use different names in these cmdlets ( -Name versus -DomainName )? Check Step 2 versus 3 and 5.

A complete Microsoft document about the procedure can be found here.


This entry was posted in Office 365, Powershell. Bookmark the permalink.