June 2005
Intermediate to advanced
464 pages
13h 2m
English
You want to delete a storage group on an Exchange server.
Launch the Exchange System Manager (Exchange System Manager.msc).
In the left pane, expand the appropriate Administrative Groups container, and then expand the Servers container.
Expand the server that contains the target storage group.
Right-click the storage group and choose Delete.
Click Yes in the confirmation dialog.
' This code deletes the selected storage group. ' ------ SCRIPT CONFIGURATION ------ strComputerName = "<serverName>" ' e.g., "batman" strSGName = "<storageGroupName>" ' e.g., "New Storage Group" ' ------ END CONFIGURATION --------- set theServer = CreateObject("CDOEXM.ExchangeServer") Set theSG = CreateObject("CDOEXM.StorageGroup") theServer.DataSource.Open strComputerName ' examine the SGs and see if we can find ours. This code will ' delete any SG whose name contains strSGName, so be careful! For Each sg In theServer.StorageGroups WScript.Echo "Examining " & sg isIn = InStr(1, UCase(sg), UCase(strSGName)) If (isIn<>0) Then wscript.echo "Deleting " & sg theSG.DataSource.Open "LDAP://" & theServer.DirectoryServer & "/" & sg ' delete the storage group theSG.DataSource.Delete WScript.Echo "Deleted SG " & sg End if Next
Unlike mailbox or public databases, the SG object itself doesn't really have any useful data in it; it's a container that points to a set of transaction logs and databases. Accordingly, when you remove ...