' This script was originally published in the Exchange Cookbook, ' (http://www.exchangebookcook.com). Written by Paul Robichaux, ' Missy Koslosky, and Devin Ganger. Redistributed with permission ' of the publisher, O'Reilly & Associates. ' This code creates a Routing Group in an Exchange administrative group. ' ------ SCRIPT CONFIGURATION ----- ' The common name of the Exchange server object to be made RGM strExchangeServer = "" ' e.g., red-exch02 ' Name of the administrative group the routing group will be in strAdminGroup = "" ' e.g., SeattleAG ' Name of the new routing group to create strRoutingGroup = "" ' e.g., RedmondRG ' Name of the Exchange organization strExchangeOrg = "" ' e.g., ExampleOrg ' ------ END CONFIGURATION -------- strConfigDN = GetObject("LDAP://RootDSE").Get("configurationNamingContext") ' The path of the routing group container strRGContainerDN = "LDAP://CN=Routing Groups,CN=" & strAdminGroup &_ ",CN=Administrative Groups,CN=" & strExchangeOrg &_ ",CN=Microsoft Exchange,CN=Services," & strConfigDN ' The path of the new routing group strRoutingGroupDN = "LDAP://CN=" & strRoutingGroup &_ ",CN=Routing Groups,CN=" & strAdminGroup &_ ",CN=Administrative Groups,CN=" & strExchangeOrg &_ ",CN=Microsoft Exchange,CN=Services," & strConfigDN ' Create the routing group Set objRGContainer = GetObject(strRGContainerDN) Set objRoutingGroup = objRGContainer.Create("msExchRoutingGroup", "CN=" &_ strRoutingGroup) ' Create the Connectors container in the new routing group Set objConnectionsContainer = objRoutingGroup.Create("msExchConnectors", _ "CN=Connections") objConnectionsContainer.Put "adminDisplayName", "Connections" objConnectionsContainer.SetInfo Wscript.Echo "Created routing group: " & strRoutingGroup & VbCrLF