Export (0) Print
Expand All

Get-DomainController

 

Applies to: Exchange Server 2013

Topic Last Modified: 2014-03-05

This cmdlet is available only in on-premises Exchange Server 2013.

Use the Get-DomainController cmdlet to view a list of domain controllers that exist in your organization.

For information about the parameter sets in the Syntax section below, see Syntax.

Get-DomainController [-Forest <Fqdn>] [-GlobalCatalog <SwitchParameter>] <COMMON PARAMETERS>
Get-DomainController [-DomainName <Fqdn>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-Credential <NetworkCredential>]

This example retrieves a list of global catalog servers in the corp.contoso.com domain.

Because a different set of credentials are required to access this domain, the Get-Credential cmdlet is used to obtain the user name and password from the user. The Get-Credential cmdlet displays a prompt to the user that accepts the user name and password. The credentials are then stored in the $UserCredentials variable.

$UserCredentials = Get-Credential

The $UserCredentials variable is then passed to the Credential parameter in the Get-DomainController command. To make the list more readable, the output is piped to the Format-Table cmdlet and only the Name and ADSite properties are displayed.

Get-DomainController -DomainName corp.contoso.com -Credential $UserCredentials | Format-Table -AutoSize Name, ADSite

For more information about pipelining and the Format-Table cmdlet, see Pipelining and Working with command output.

The Get-DomainController cmdlet is used by the Exchange Administration Center in Microsoft Exchange Server 2013 to populate fields that display domain controller information.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Active Directory Domain Services server settings" entry in the Exchange and Shell infrastructure permissions topic.

 

Parameter Required Type Description

Credential

Optional

System.Net.NetworkCredential

The Credential parameter specifies the credentials to use to access the domain specified if the DomainName parameter is used. If the Forest parameter is used, the credentials are used to access the forest.

This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential.

DomainName

Optional

Microsoft.Exchange.Data.Fqdn

The DomainName parameter specifies the fully qualified domain name (FQDN) of the domain for which you want to return a list of domain controllers.

Forest

Optional

Microsoft.Exchange.Data.Fqdn

The Forest parameter specifies the FQDN of the root domain of the forest for which you want to return a list of domain controllers.

GlobalCatalog

Optional

System.Management.Automation.SwitchParameter

The GlobalCatalog switch specifies whether the command should return a list of global catalog servers.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft