Set-AdServerSettings
Applies to: Exchange Server 2013
Topic Last Modified: 2014-07-08
This cmdlet is available only in on-premises Exchange Server 2013.
Use the Set-AdServerSettings cmdlet to manage the Active Directory Domain Services (AD DS) environment in the current Exchange Management Shell session. The Set-AdServerSettings cmdlet replaces the AdminSessionADSettings session variable that was used in Microsoft Exchange Server 2007.
For information about the parameter sets in the Syntax section below, see Syntax.
Set-AdServerSettings [-ConfigurationDomainController <Fqdn>] [-PreferredGlobalCatalog <Fqdn>] [-RecipientViewRoot <String>] [-SetPreferredDomainControllers <MultiValuedProperty>] [-ViewEntireForest <$true | $false>] <COMMON PARAMETERS>
Set-AdServerSettings [-PreferredServer <Fqdn>] [-RecipientViewRoot <String>] [-ViewEntireForest <$true | $false>] <COMMON PARAMETERS>
Set-AdServerSettings -RunspaceServerSettings <RunspaceServerSettingsPresentationObject> <COMMON PARAMETERS>
Set-AdServerSettings -DisableGls <$true | $false> <COMMON PARAMETERS>
Set-AdServerSettings -ForceADInTemplateScope <$true | $false> <COMMON PARAMETERS>
Set-AdServerSettings -ResetSettings <SwitchParameter> <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [-WriteOriginatingChangeTimestamp <$true | $false>] [-WriteShadowProperties <$true | $false>]
This example sets the recipient scope to the Marketing Users OU in the contoso.com domain for the current session.
Set-AdServerSettings -RecipientViewRoot "contoso.com/Marketing Users"
This example sets the scope of the current session to the entire forest and designates gc1.contoso.com as the preferred global catalog server.
Set-AdServerSettings -ViewEntireForest $true -PreferredGlobalCatalog gc1.contoso.com
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 |
|---|---|---|---|
| DisableGls | Required | System.Boolean | This parameter is reserved for internal Microsoft use. |
| ForceADInTemplateScope | Required | System.Boolean | This parameter is reserved for internal Microsoft use. |
| ResetSettings | Required | System.Management.Automation.SwitchParameter | This parameter is reserved for internal Microsoft use. |
| RunspaceServerSettings | Required | Microsoft.Exchange.Data.Directory.Management.RunspaceServerSettingsPresentationObject | The RunspaceServerSettings parameter specifies whether to pass an entire configuration object to the command to be processed. This parameter is useful in scripts where an entire object must be passed to the command. |
| ConfigurationDomainController | Optional | Microsoft.Exchange.Data.Fqdn | The ConfigurationDomainController parameter specifies the fully qualified domain name (FQDN) of the configuration domain controller to be used for reading Exchange configuration information in this session. |
| Confirm | Optional | System.Management.Automation.SwitchParameter | The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch. |
| PreferredGlobalCatalog | Optional | Microsoft.Exchange.Data.Fqdn | The PreferredGlobalCatalog parameter specifies the FQDN of the global catalog server to be used for reading recipient information in this session. |
| PreferredServer | Optional | Microsoft.Exchange.Data.Fqdn | The PreferredServer parameter specifies the FQDN of the domain controller to be used for this session. |
| RecipientViewRoot | Optional | System.String | The RecipientViewRoot parameter specifies the organizational unit (OU) to include in the recipient scope for this session. When you specify a recipient scope with this parameter, only the recipients included in the scope are returned. To specify an OU, use the syntax |
| SetPreferredDomainControllers | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The SetPreferredDomainControllers parameter specifies the list of domain controllers used to read information from Active Directory in this session. You must specify the FQDN of the domain controllers. Separate multiple domain controllers using commas. |
| ViewEntireForest | Optional | System.Boolean | The ViewEntireForest parameter specifies whether all the objects in the forest are viewed and managed in this session. Valid values are When you specify a value of |
| WhatIf | Optional | System.Management.Automation.SwitchParameter | The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch. |
| WriteOriginatingChangeTimestamp | Optional | System.Boolean | This parameter is reserved for internal Microsoft use. |
| WriteShadowProperties | Optional | System.Boolean | This parameter is reserved for internal Microsoft use. |
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.
