Get-EntraDomain

Gets a domain.

Syntax

Get-EntraDomain
   [-Property <String[]>]
   [<CommonParameters>]
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.

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

-Property

Specifies properties to be returned.

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