' 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 new Routing Group Master in a routing 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 is in strAdminGroup = "" ' e.g., SeattleAG ' Name of the routing group the server is in strRoutingGroup = "" ' e.g., RedmondRG ' Name of the Exchange organization strExchangeOrg = "" ' e.g., ExampleOrg ' ------ END CONFIGURATION -------- strConfigDN = GetObject("LDAP://RootDSE").Get("configurationNamingContext") strExchangeServerDN = "CN=" & strExchangeServer & ",CN=Servers,CN=" & _ strAdminGroup & ",CN=Administrative Groups,CN=" & _ strExchangeOrg & ",CN=Microsoft Exchange,CN=Services," & _ strConfigDN strRoutingGroupDN = "LDAP://CN=" & strRoutingGroup & ",CN=Routing Groups,CN=" & _ strAdminGroup & ",CN=Administrative Groups,CN=" & _ strExchangeOrg & ",CN=Microsoft Exchange,CN=Services," & _ strConfigDN Set objRoutingGroup = GetObject(strRoutingGroupDN) objRoutingGroup.Put "msExchRoutingMasterDN", strExchangeServerDN objRoutingGroup.SetInfo Wscript.Echo strExchangeServer & "is now RGM for the " &_ strRoutingGroup & " routing group." & VbCrLF