Get-MsolDomain
Gets a domain in Azure Active Directory.
Syntax
Get-MsolDomain
[-Status <DomainStatus>]
[-Authentication <DomainAuthenticationType>]
[-Capability <DomainCapabilities>]
[-TenantId <Guid>]
[<CommonParameters>]
Get-MsolDomain
-DomainName <String>
[-TenantId <Guid>]
[<CommonParameters>]
Description
The Get-MsolDomain cmdlet gets a company domains.
Examples
Example 1: Get all domains for the company
PS C:\> Get-MsolDomain
This command retrieves all domains for the company, verified or unverified.
Example 2: Get a domain by name
PS C:\> Get-MsolDomain -DomainName "contoso.com"
This command retrieves the contoso.com domain.
Example 3: Get verified domains
PS C:\> Get-MsolDomain -Status Verified
This command returns a list of verified company domains.
Parameters
-Authentication
Specifies the filter for the specified authentication type. If provided, only domains with the authentication type are returned.
Type: | DomainAuthenticationType |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Capability
Specifies the filter for domains that have the specified capability assigned.
Type: | DomainCapabilities |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DomainName
Specifies the fully qualified domain name to retrieve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Status
Specifies the filter to return only domains with the specified status. Valid values are: Verified, Unverified, and PendingDeletion.
Type: | DomainStatus |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TenantId
Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
Microsoft.Online.Administration.Domain
Each domain returned will include the following information:
Authentication. The authentication type of the domain (managed or federated).
Capabilities. The capabilities assigned to the domain. These can be SharePoint, email, or OfficeCommunicationsOnline. A domain with SharePoint capability cannot be used for other capabilities.
IsDefault. This is the default domain that is used for user creation. There is only one default domain per company.
IsInitial. Whether or not this is the initial domain created by Microsoft Azure Active Directory ([companyname].onmicrosoft.com).
Name. The full name of the domain.
RootDomain. For subdomains, this represents the root domain. Only root domains need to be verified, and all subdomains will be automatically verified.
Status. The status of the domain (verified or unverified).