Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1
Topic Last Modified: 2007-06-28

Use the Set-AdSite cmdlet to configure an Active Directory directory service site as a hub site to override the default message routing behavior of a computer that has the Hub Transport server role installed.

Syntax

Set-AdSite -Identity <AdSiteIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-HubSiteEnabled <$true | $false>] [-Name <String>] [-WhatIf [<SwitchParameter>]]
Set-AdSite [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-HubSiteEnabled <$true | $false>] [-Instance <ADSite>] [-Name <String>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.AdSiteIdParameter

Use the Identity parameter to specify the identity of the Active Directory site that you want to modify. The identity can be expressed as a GUID or by using the Active Directory site name. If the site name includes spaces, enclose the entry in double quotation marks.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires the administrator to acknowledge what the command will do before processing continues. The default value is $true.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

Use the DomainController parameter to specify the host name or fully qualified domain name (FQDN) of the domain controller that will write this change to Active Directory.

HubSiteEnabled

Optional

System.Boolean

Use the HubSiteEnabled parameter to specify whether this site will act as a hub site. The default value is $false.

Instance

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.ADSite

Use the Instance parameter to pass a complete object to the command to be processed. It is mainly used in scripts where a complete object must be passed to the command.

Name

Optional

System.String

Use the Name parameter to modify the current name of the Active Directory site. You must have Enterprise Administrator rights to use this parameter.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, the administrator can view what changes would occur without having to apply any of those changes. The default value is $true.

Detailed Description

Microsoft Exchange 2007 Hub Transport servers use Active Directory sites and the costs that are assigned to the Active Directory site links to determine the least cost routing path from each Hub Transport server in the organization to every other Hub Transport server in the organization. After the least cost routing path is determined, the source Hub Transport servers relay messages directly to the destination Hub Transport servers. By default, the Hub Transport servers that are located in Active Directory sites along the path between the source server and the destination server do not process or relay the messages in any way.

You can use the Set-AdSite cmdlet to override this behavior by setting an Active Directory site as a hub site. When a hub site exists along the least cost routing path between two Hub Transport servers, the messages are routed to the hub site for processing before they are relayed to the destination server.

To run the Set-AdSite cmdlet, the account you use must be delegated the following:

  • Exchange Organization Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The following code example sets the Active Directory site that is named Default-First-Site-Name as a hub site.

Copy Code
Set-AdSite -Identity Default-First-Site-Name -HubSiteEnabled $true