This documentation is archived and is not being maintained.

Exchange_FolderTree Class

Exchange Server 2003

Exchange_FolderTree Class

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Instances of the Exchange_FolderTree WMI class provide information about public and private folder trees on Microsoft® Exchange servers.




The ExchangeFolderTreeProvider supplies instances of the Exchange_FolderTree class.


The Exchange_FolderTree class extends the CIM_LogicalElement class.




Property Description
AdministrativeGroup Property
 read] string AdministrativeGroup;

The AdministrativeGroup property indicates the name of the administrative group that the top-level hierarchy (TLH) resides under in Microsoft Active Directory®.

Name Property
 key] string Name = NULL;

The Name property indicates the name of the top-level hierarchy (TLH).

AdministrativeNote Property
[read] string AdministrativeNote;

The AdministrativeNote property indicates the administrative note attached to the Active Directory object representing the tree.

AssociatedPublicStores Property
[read] string AssociatedPublicStores

The AssociatedPublicStores property indicates the list of MDBs associated with the top-level hierarchy (TLH).

CreationTime Property
[read] datetime CreationTime;

The CreationTime property indicates when the tree was created.

GUID Property
[read] string GUID;

The GUID property indicates the globally unique identifier (GUID) of the top-level hierarchy (TLH) object in Active Directory.

HasLocalPublicStore Property
[read] boolean HasLocalPublicStore;

The HasLocalPublicStore property indicates whether the computer contains the Exchange store associated with the folder tree.

LastModificationTime Property
[read] datetime LastModificationTime;

The LastModificationTime property indicates when the tree was last modified.

MapiFolderTree Property
[read] boolean MapiFolderTree;

The MapiFolderTree property indicates whether this is the MAPI top-level hierarchy (TLH).

RootFolderURL Property
[read] string RootFolderURL;

The RootFolderURL property indicates the URL to the root of the tree referenced through the Exchange administration Microsoft Internet Information Services (IIS) virtual directory.


This class has no methods.


This class has no associations.

Selecting Instances Using VBScript

The following example shows how to retrieve a list of Exchange_FolderTree instances, and how to retrieve all the associated properties.

' Purpose:   Display each Exchange_FolderTree found for Exchange server,
'            and show all properties on the Exchange_FolderTree
'            objects
' Change:    cComputerName [string] the computer to access
' Output:    Displays the name of each Exchange_FolderTree and properties

On Error Resume Next
Dim cComputerName
Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_FolderTree"
cComputerName = "MyComputerNETBIOSName"

Dim strWinMgmts		' Connection string for WMI
Dim objWMIExchange	' Exchange Namespace WMI object
Dim listExchange_FolderTrees	' ExchangeLogons collection
Dim objExchange_FolderTree		' A single ExchangeLogon WMI object

' Create the object string, indicating WMI (winmgmts), using the
' current user credentials (impersonationLevel=impersonate),
' on the computer specified in the constant cComputerName, and
' using the CIM namespace for the Exchange provider.
strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//"& _
Set objWMIExchange =  GetObject(strWinMgmts)
' Verify we were able to correctly set the object.
If Err.Number <> 0 Then
  WScript.Echo "ERROR: Unable to connect to the WMI namespace."
  ' The Resources that currently exist appear as a list of
  ' Exchange_FolderTree instances in the Exchange namespace.
  Set listExchange_FolderTrees = objWMIExchange.InstancesOf(cWMIInstance)
  ' Were any Exchange_FolderTree Instances returned?
  If (listExchange_FolderTrees.count > 0) Then
    ' If yes, do the following:
    ' Iterate through the list of Exchange_FolderTree objects.
    For Each objExchange_FolderTree in listExchange_FolderTrees
       ' Display the value of the AdministrativeGroup property.
       WScript.echo "AdministrativeGroup      = "& _
        " ["&TypeName(objExchange_FolderTree.AdministrativeGroup)&"] "& _
       ' Display the value of the AdministrativeNote property.
       WScript.echo "AdministrativeNote       = "& _
        " ["&TypeName(objExchange_FolderTree.AdministrativeNote)&"] "& _
       ' Display the value of the AssociatedPublicStores property.
       WScript.echo "AssociatedPublicStores   = "& _
        " ["&TypeName(objExchange_FolderTree.AssociatedPublicStores)&"] "& _
       ' Display the value of the CreationTime property.
       WScript.echo "CreationTime             = "& _
        " ["&TypeName(objExchange_FolderTree.CreationTime)&"] "& _
       ' Display the value of the GUID property.
       WScript.echo "GUID                     = "& _
        " ["&TypeName(objExchange_FolderTree.GUID)&"] "& _
       ' Display the value of the HasLocalPublicStore property.
       WScript.echo "HasLocalPublicStore      = "& _
        " ["&TypeName(objExchange_FolderTree.HasLocalPublicStore)&"] "& _
       ' Display the value of the LastModificationTime property.
       WScript.echo "LastModificationTime     = "& _
        " ["&TypeName(objExchange_FolderTree.LastModificationTime)&"] "& _
       ' Display the value of the MapiFolderTree property.
       WScript.echo "MapiFolderTree           = "& _
        " ["&TypeName(objExchange_FolderTree.MapiFolderTree)&"] "& _
       ' Display the value of the Name property.
       WScript.echo "Name                     = "& _
        " ["&TypeName(objExchange_FolderTree.Name)&"] "& _
       ' Display the value of the RootFolderURL property.
       WScript.echo "RootFolderURL            = "& _
        " ["&TypeName(objExchange_FolderTree.RootFolderURL)&"] "& _
    ' If no Exchange_FolderTree instances were returned,
    ' display that.
    WScript.Echo "WARNING: No Exchange_FolderTree instances were returned."
  End If
End If