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.
New-MsolDomain
[-Name <String>]
[-Authentication <DomainAuthenticationType>]
[-VerificationMethod <DomainVerificationMethod>]
[-TenantId <Guid>]
[<CommonParameters>]
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.
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.
Conclusion
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.