Previous Page
Next Page

Exchange_FolderTree

To look at the folder structure defined on an Exchange 2003 server, you can use the Exchange_FolderTree class. The only changes you must make to your script are the same changes you made to the other scriptschanging the class portion of wmiQuery to point to the Exchange_FolderTree class. Then you must modify the Output information section to echo out the properties you are interested in. The completed ExchangeFolderTree.vbs script is listed here:

ExchangeFolderTree.vbs

Option Explicit
On Error Resume Next
Dim strComputer
Dim wmiNS
Dim wmiQuery
Dim objWMIService
Dim colItems
Dim objItem

strComputer = "."
wmiNS = "\root\MicrosoftExchangeV2"
wmiQuery = "Select * from Exchange_FolderTree"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS)
Set colItems = objWMIService.ExecQuery(wmiQuery)

For Each objItem In colItems
  WScript.Echo "AdministrativeGroup: " _
    & objItem.AdministrativeGroup
  WScript.Echo "AdministrativeNote: " _
    & objItem.AdministrativeNote
  WScript.Echo "AssociatedPublicStores: " _
    & objItem.AssociatedPublicStores
  WScript.Echo "Caption: " & objItem.Caption
  WScript.Echo "CreationTime: " & objItem.CreationTime
  WScript.Echo "Description: " & objItem.Description
  WScript.Echo "GUID: " & objItem.GUID
  WScript.Echo "HasLocalPublicStore: " _
    & objItem.HasLocalPublicStore
  WScript.Echo "InstallDate: " & objItem.InstallDate
  WScript.Echo "LastModificationTime: " _
    & objItem.LastModificationTime
  WScript.Echo "MapiFolderTree: " & objItem.MapiFolderTree
  WScript.Echo "Name: " & objItem.Name
  WScript.Echo "RootFolderURL: " & objItem.RootFolderURL
  WScript.Echo "Status: " & objItem.Status
  WScript.Echo "-=-"

Next


Previous Page
Next Page