Get-EntraDomain
Gets a domain.
Syntax
GetQuery (Default)
Get-EntraDomain
[-Property <String[]>]
[<CommonParameters>]
GetById
Get-EntraDomain
-Name <String>
[-Property <String[]>]
[<CommonParameters>]
Description
The Get-EntraDomain cmdlet gets a domain in Microsoft Entra ID.
The work or school account must be assigned to at least one of the following Microsoft Entra roles:
- User Administrator
- Helpdesk Administrator
- Service Support Administrator
- Directory Readers
- AdHoc License Administrator
- Application Administrator
- Security Reader
- Security Administrator
- Privileged Role Administrator
- Cloud Application Administrator
Examples
Example 1: Get a list of Domains that are created
Connect-Entra -Scopes 'Domain.Read.All'
Get-EntraDomain
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- --------------------------------
test22.com Managed True False False False False 13
test33.com Managed True False False False False 15
test44.com Managed True False False False False 17
This command retrieves a list of domains.
Example 2: Get a specific Domain
Connect-Entra -Scopes 'Domain.Read.All'
Get-EntraDomain -Name TEST22.com
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- --------------------------------
test22.com Managed True False False False False 13
This command retrieves a domain with the specified name.
Parameters
-Name
Specifies the name of a domain.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
GetById
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Property
Specifies properties to be returned.
Parameter properties
| Type: | System.String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Select |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.