Export (0) Print
Expand All

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.

Namespace

\\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_FolderTree

Provider

The ExchangeFolderTreeProvider supplies instances of the Exchange_FolderTree class.

Origin

The Exchange_FolderTree class extends the CIM_LogicalElement class.

Qualifiers

dynamic

Properties

Property Description
AdministrativeGroup Property
[key,
 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
[read,
 Override("Name"),
 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.

Methods

This class has no methods.

Associations

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}!//"& _
cComputerName&"/"&cWMINameSpace
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."
Else
  '
  ' 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
   Wscript.Echo""
   Wscript.Echo""
       '
       ' Display the value of the AdministrativeGroup property.
       WScript.echo "AdministrativeGroup      = "& _
        " ["&TypeName(objExchange_FolderTree.AdministrativeGroup)&"] "& _
       objExchange_FolderTree.AdministrativeGroup
       '
       '
       ' Display the value of the AdministrativeNote property.
       WScript.echo "AdministrativeNote       = "& _
        " ["&TypeName(objExchange_FolderTree.AdministrativeNote)&"] "& _
       objExchange_FolderTree.AdministrativeNote
       '
       '
       ' Display the value of the AssociatedPublicStores property.
       WScript.echo "AssociatedPublicStores   = "& _
        " ["&TypeName(objExchange_FolderTree.AssociatedPublicStores)&"] "& _
       objExchange_FolderTree.AssociatedPublicStores
       '
       '
       ' Display the value of the CreationTime property.
       WScript.echo "CreationTime             = "& _
        " ["&TypeName(objExchange_FolderTree.CreationTime)&"] "& _
       objExchange_FolderTree.CreationTime
       '
       '
       ' Display the value of the GUID property.
       WScript.echo "GUID                     = "& _
        " ["&TypeName(objExchange_FolderTree.GUID)&"] "& _
       objExchange_FolderTree.GUID
       '
       '
       ' Display the value of the HasLocalPublicStore property.
       WScript.echo "HasLocalPublicStore      = "& _
        " ["&TypeName(objExchange_FolderTree.HasLocalPublicStore)&"] "& _
       objExchange_FolderTree.HasLocalPublicStore
       '
       '
       ' Display the value of the LastModificationTime property.
       WScript.echo "LastModificationTime     = "& _
        " ["&TypeName(objExchange_FolderTree.LastModificationTime)&"] "& _
       objExchange_FolderTree.LastModificationTime
       '
       '
       ' Display the value of the MapiFolderTree property.
       WScript.echo "MapiFolderTree           = "& _
        " ["&TypeName(objExchange_FolderTree.MapiFolderTree)&"] "& _
       objExchange_FolderTree.MapiFolderTree
       '
       '
       ' Display the value of the Name property.
       WScript.echo "Name                     = "& _
        " ["&TypeName(objExchange_FolderTree.Name)&"] "& _
       objExchange_FolderTree.Name
       '
       '
       ' Display the value of the RootFolderURL property.
       WScript.echo "RootFolderURL            = "& _
        " ["&TypeName(objExchange_FolderTree.RootFolderURL)&"] "& _
       objExchange_FolderTree.RootFolderURL
       '
    Next
  Else
    ' If no Exchange_FolderTree instances were returned,
    ' display that.
    WScript.Echo "WARNING: No Exchange_FolderTree instances were returned."
  End If
End If

Show:
© 2014 Microsoft