' 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 script creates a new storage group on the specified server ' ------ SCRIPT CONFIGURATION ------ strComputerName = "" ' "batman" strSGName = "" ' e.g. "New Storage Group" ' ------ END CONFIGURATION --------- set theServer = CreateObject("CDOEXM.ExchangeServer") Set theSG = CreateObject("CDOEXM.StorageGroup") theServer.DataSource.Open strComputerName ' Get the array list of StorageGroups, then coerce it to get the first ' SG name theSGArr = theServer.StorageGroups theFirstSG = theSGArr(0) ' stuff our new SG name into the URL strTemp = Mid(theFirstSG, InStr(2, theFirstSG, "CN")) strTargetSG = "LDAP://" & theServer.DirectoryServer & "/CN=" & _ strSGName & "," & theFirstSG ' saving the new SG object to this URL actually creates the SG theSG.DataSource.SaveTo strTargetSG WScript.Echo "New SG " & strTargetSG & " created"