' 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 lists all of the storage groups on the specified server. ' For each SG, it lists information on the SG, including its ' database stores and their paths. ' ------ SCRIPT CONFIGURATION ------ strComputerName = "" ' e.g. "batman" ' ------ END CONFIGURATION --------- set theServer = CreateObject("CDOEXM.ExchangeServer") Set theSG = CreateObject("CDOEXM.StorageGroup") Set thePF = CreateObject("CDOEXM.PublicStoreDB") Set theMB = CreateObject("CDOEXM.MailboxStoreDB") theServer.DataSource.Open strComputerName ' examine the SGs; for each SG, list its associated stores and paths For Each sg In theServer.StorageGroups WScript.Echo "Storage group " & Chr(34) & sg & Chr(34) theSG.DataSource.open sg i = 0 For Each mailDB In theSG.MailboxStoreDBs i = i+1 WScript.Echo " Mailbox database " & i & ": " & mailDB theMB.DataSource.open mailDB WScript.Echo " Name:" & theMB.name WScript.Echo " Path:" & theMB.DBPath Next i = 0 For Each pubDB In theSG.PublicStoreDBs i = i+1 WScript.Echo " PF database " & i & ": " & mailDB thePF.DataSource.open pubDB WScript.Echo " Name:" & thePF.Name WScript.Echo " Path:" & thePF.DBPath Next Next