Recipe9.6.Getting Properties of the Public Folder Tree


Recipe 9.6. Getting Properties of the Public Folder Tree

Problem

You want to see properties of the public folder trees (or TLHs) on your servers.

Solution

Using a graphical user interface

  1. Launch the Exchange System Manager (Exchange System Manager.msc).

  2. In the left pane, expand the appropriate Administrative Groups container.

  3. Expand the Folders node.

  4. Right-click the public folder TLH you're interested in (the default MAPI TLH is named Public Folders).

  5. Select Properties.

Using VBScript
' This code displays selected properties of TLHs on a server ' ------ SCRIPT CONFIGURATION ------  strComputerName = "<serverName>"     ' 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

Discussion

There aren't that many properties associated with public folder TLHs, but the ones that do exist are pretty interesting. For example, you can see a list of all the public folder stores associated with a particular TLH, and you can easily get the creation and modification timesvery useful when you're trying to determine which folders are old and unused as part of a migration. The WMI Exchange_FolderTree class definition on MSDN lists all the properties you can access. One useful attribute that WMI doesn't give you access to is the ACL on the TLH object; if you want to see or adjust its properties, you'll need to use the Security tab of the tree properties dialog in ESM.

See Also

MSDN: Exchange_FolderTree class



Exchange Server Cookbook
Exchange Server Cookbook: For Exchange Server 2003 and Exchange 2000 Server
ISBN: 0596007175
EAN: 2147483647
Year: 2006
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net