' 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 displays selected properties of TLHs on a server ' ------ SCRIPT CONFIGURATION ------ strComputerName = "" ' e.g., "cyclone" ' ------ END CONFIGURATION --------- strE2K3WMIQuery = "winmgmts://" & strComputerName &_ "/root/MicrosoftExchangeV2" Set wmiService = GetObject(strE2K3WMIQuery) Set treeList = wmiService.InstancesOf("Exchange_FolderTree") If (treeList.Count > 0) Then For Each tree In treeList wscript.echo " Tree '" & tree.name & "'" wscript.echo " Created: " & tree.CreationTime wscript.echo " Admin note: " & tree.AdministrativeNote wscript.echo " Associated stores: " & _ UBound(tree.AssociatedPublicStores) & " total" For i = 0 To UBound(tree.AssociatedPublicStores) wscript.echo " " & i & "==> " & _ tree.AssociatedPublicStores(i) next next WScript.Echo "Done processing folders." End if