New-EntraDomain

Creates a domain.

Syntax

New-EntraDomain
   -Name <String>
   [-IsDefault <Boolean>]
   [-SupportedServices <System.Collections.Generic.List`1[System.String]>]
   [<CommonParameters>]

Description

The New-EntraDomain cmdlet creates a domain in Microsoft Entra ID.

The work or school account needs to belong to at least the Domain Name Administrator role.

Examples

Example 1: Create a new Domain

Connect-Entra -Scopes 'Domain.ReadWrite.All'
New-EntraDomain -Name testingDemo.com

Id              AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices
--              ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- -----------------
testingDemo.com Managed                               True           False     False     False  False                                                                                       {}

This example demonstrates how to create a new domain in Microsoft Entra ID.

Example 2: Create a new Domain with a list of domain capabilities

Connect-Entra -Scopes 'Domain.ReadWrite.All'
New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline')

Id               AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices
--               ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- -----------------
testingDemo1.com Managed                               True           False     False     False  False                                                                                       {}

This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID.

Example 3: Create a new Domain and make if the default new user creation

Connect-Entra -Scopes 'Domain.ReadWrite.All'
New-EntraDomain -Name testingDemo2.com -IsDefault $True

Id               AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices
--               ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- -----------------
testingDemo2.com Managed                               True           False     False     False  False                                                                                       {}

This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation.

Parameters

-IsDefault

Indicates whether or not this is the default domain that is used for user creation.

There is only one default domain per company.

Type:System.Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The fully qualified name of the domain.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SupportedServices

The capabilities assigned to the domain.

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False