Home ยป Office 365 ยป New-MsolDomain – Adding a Domain to Office 365

New-MsolDomain – Adding a Domain to Office 365

The New-MsolDomain cmdlet in PowerShell adds a domain to Office 365. This command can create domains with managed or federated identities.

The syntax to add a domain to Azure Active Directory is given below.

   [-Name <String>]
   [-Authentication <DomainAuthenticationType>]
   [-VerificationMethod <DomainVerificationMethod>]
   [-TenantId <Guid>]

In this article, we will discuss how to use the New-MsolDomain cmdlet in PowerShell to add a new domain to Office 365.

How to Create a Domain in Office 365 with PowerShell

To create a domain in Office 365 with PowerShell, use the New-MsolDomain cmdlet.

New-MsolDomain -Name "shellgeeklab.com"

This command creates a domain named โ€œshellgeeklab.comโ€œ. You must verify the domain before it can be used.

Add a New Domain to Office 365
Add a New Domain to Office 365

The output of the New-MsolDomain cmdlet includes the following properties:

  • Name: The name of the domain that you wanted to add to Office 365
  • Status: The status of the domain after adding it to Office 365
  • Authentication: The authentication type of the domain. Valid values are: managed and federated.


I hope the above article on how to add a domain to Office 365 with PowerShell using the New-MsolDomain cmdlet is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.

Related Links