Exchange_PublicFolder Class
The Exchange_PublicFolder WMI class provides properties and methods for working with Microsoft® Exchange public folders.
Namespace
\\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_PublicFolder
Provider
The ExchangePublicFolderProvider supplies instances of the Exchange_PublicFolder class.
Origin
The Exchange_PublicFolder class extends the CIM_LogicalElement class.
Qualifiers
dynamic
Properties
| Property | Description |
|---|---|
| Url Property |
[key, read] string Url; The Url property indicates the folder URL, constructed using the folder globally unique identifier (GUID). |
| AddressBookName Property |
[read, write] string AddressBookName; The AddressBookName property specifies the address book name of the folder. |
| AdministrativeNote Property |
[read, write] string AdministrativeNote; The AdministrativeNote property specifies the administrative note associated with the folder. |
| AdminSecurityDescriptor Property |
[read, write] uint8 AdminSecurityDescriptor []; The AdminSecurityDescriptor property specifies the security descriptor that is used when a user logs on to the store with administrative privileges. |
| ADProxyPath Property |
[read] string ADProxyPath; The ADProxyPath property indicates the GUID of the Microsoft Active Directory® mail proxy for the folder. |
| AssociatedMessageCount Property |
[read] uint32 AssociatedMessageCount; The AssociatedMessageCount property is a MAPI property that contains the total number of associated messages in the public folder. |
| AttachmentCount Property |
[read] uint32 AttachmentCount; The AttachmentCount property indicates the total number of attachments on all normal messages in a folder. |
| CategorizationCount Property |
[read] uint32 CategorizationCount; The CategorizationCount property indicates the total number of categorizations on the public folder. |
| Comment Property |
[read, write] string Comment; The Comment property specifies the folder comment. |
| ContactCount Property |
[read] uint32 ContactCount; The ContactCount property indicates the number of contacts in a public folder. |
| ContainsRules Property |
[read] boolean ContainsRules; The ContainsRules property indicates whether the public folder contains rules. |
| CreationTime Property |
[read] datetime CreationTime; The CreationTime property indicates when the folder was created. |
| DeletedItemLifetime Property |
[read,
write,
units("days")] uint32 DeletedItemLifetime;
The DeletedItemLifetime property specifies how long, in days, that deleted messages can be recovered. |
| FolderTree Property |
[read] string FolderTree; The FolderTree property indicates the WMI path to the top-level hierarchy object to which the folder belongs. |
| FriendlyUrl Property |
[read] string FriendlyUrl; The FriendlyUrl property indicates the path-based URL to the folder. |
| HasChildren Property |
[read] boolean HasChildren; The HasChildren property indicates whether the folder has subfolders. |
| HasLocalReplica Property |
[read] boolean HasLocalReplica; The HasLocalReplica property indicates whether the folder has a local replica. |
| IsMailEnabled Property |
[read, write] boolean IsMailEnabled; The IsMailEnabled property specifies whether the folder is mail-enabled. |
| IsNormalFolder Property |
[read] boolean IsNormalFolder; The IsNormalFolder property indicates whether the public folder is a normal folder. |
| IsPerUserReadDisabled Property |
[read, write] boolean IsPerUserReadDisabled; The IsPerUserReadDisabled property specifies whether the folder tracks per-user read information for messages. |
| IsSearchFolder Property |
[read] boolean IsSearchFolder; The IsSearchFolder property indicates whether the public folder is a search folder. |
| IsSecureInSite Property |
[read, write] boolean IsSecureInSite; The IsSecureInSite property specifies whether administrative access is limited to the home site of the folder. |
| LastAccessTime Property |
[read] datetime LastAccessTime; The LastAccessTime property indicates the last date that the replica of a public folder was accessed. |
| LastModificationTime Property |
[read] datetime LastModificationTime; The LastModificationTime property indicates when the folder was last modified. |
| MaximumItemSize Property |
[read,
write,
units("KB")] uint32 MaximumItemSize;
The MaximumItemSize property specifies the maximum size, in kilobytes (KB), that is allowed for an individual post to the folder. |
| MessageCount Property |
[read] uint32 MessageCount; The MessageCount property indicates the number of messages in a public folder. |
| MessageWithAttachmentsCount Property |
[read] uint32 MessageWithAttachmentsCount; The MessageWithAttachmentsCount property indicates the total number of normal messages with attachments in the public folder. |
| Name Property |
[read,
Override("Name"),
required] string Name = NULL;
The Name property indicates the name of the folder. |
| NormalMessageSize Property |
[read,
units("bytes")] uint32 NormalMessageSize;
The NormalMessageSize property indicates the total size, in bytes, of all of the normal messages in the public folder. |
| OwnerCount Property |
[read] uint32 OwnerCount; The OwnerCount property indicates the number of owners of the public folder. |
| ParentFriendlyUrl Property |
[read, required] string ParentFriendlyUrl; The ParentFriendlyUrl property indicates the folder path-based URL to the parent of the folder. |
| Path Property |
[read] string Path; The Path property indicates the folder path minus the URL http://server/vroot header portion. |
| ProhibitPostLimit Property |
[read,
write,
units("KB")] uint32 ProhibitPostLimit;
The ProhibitPostLimit property specifies the folder size limit, in KB, when posting is prevented. |
| PublishInAddressBook Property |
[read, write] boolean PublishInAddressBook; The PublishInAddressBook property specifies whether the folder will show up in the global address list if it is mail-enabled. |
| RecipientCountOnAssociatedMessages Property |
[read] uint32 RecipientCountOnAssociatedMessages; The RecipientCountOnAssociatedMessages property indicates the total number of recipients on the associated messages in the public folder. |
| RecipientCountOnNormalMessages Property |
[read] uint32 RecipientCountOnNormalMessages; The RecipientCountOnNormalMessages property indicates the total number of recipients on the normal messages in the public folder. |
| ReplicaAgeLimit Property |
[read,
write,
units("days")] uint32 ReplicaAgeLimit;
The ReplicaAgeLimit property specifies the age limit for messages across all replicas. |
| ReplicaList Property |
[read] string ReplicaList[]; The ReplicaList property indicates the list of distinguished names of the MDBs to which the folder is replicated. |
| ReplicationMessagePriority Property |
[read,
write,
Values{"Not Urgent", "Normal",
"Urgent"},
ValueMap{"0", "1", "2"}] uint32 ReplicationMessagePriority;
The ReplicationMessagePriority property specifies the priority level for replicating folder messages. |
| ReplicationSchedule Property |
[read, write] Exchange_ScheduleInterval ReplicationSchedule []; The array elements of the ReplicationSchedule property specify the replication schedule of the folder. Each element of the array is an instance of the Exchange_ScheduleInterval Class. |
| ReplicationStyle Property |
[read,
write,
Values{"Custom", "Never", "Always",
"Every hour", "Every two hours",
"Every four hours", "Use public store schedule"},
ValueMap{"0", "1", "2", "3",
"4", "5", "6"}] uint32 ReplicationStyle;
The ReplicationStyle property specifies how often the folder contents are replicated. |
| RestrictionCount Property |
[read] uint32 RestrictionCount; The RestrictionCount property indicates the total number of restrictions on the public folder. |
| SecurityDescriptor Property |
[read, write] uint8 SecurityDescriptor []; The SecurityDescriptor property specifies the administrative security descriptor for the folder. |
| StorageLimitStyle Property |
[read,
write,
Values{"Use public store style",
"Use Specified Quota", "No Quota"},
ValueMap{"0", "1", "2"}] uint32 StorageLimitStyle;
The StorageLimitStyle property specifies whether the folder should use public store storage limits, have no quota, or use quota values set on the folder. |
| TargetAddress Property |
[read] string TargetAddress; The TargetAddress property is a MAPI property that contains the e-mail address of the public folder. |
| TotalMessageSize Property |
[read,
units("bytes")] uint32 TotalMessageSize;
The TotalMessageSize property indicates the total size, in bytes, of all of the normal messages in the public folder. The TotalMessageSize property is an 8-byte version of the NormalMessageSize property. |
| UsePublicStoreAgeLimits Property |
[read, write] boolean UsePublicStoreAgeLimits; The UsePublicStoreAgeLimits property specifies whether the folder should use the age limits of the message database (MDB) in which it is stored. |
| UsePublicStoreDeletedItemLifetime Property |
[read, write] boolean UsePublicStoreDeletedItemLifetime; The UsePublicStoreDeletedItemLifetime property specifies whether the folder should use the deleted item lifetime of the local public MDB. |
| WarningLimit Property |
[read,
write,
units("KB")] uint32 WarningLimit;
The WarningLimit property specifies the folder size limit, in KB, when warning messages are sent. |
Methods
| Method | Description |
|---|---|
| AddReplica Method |
[implemented] void AddReplica( [IN] string Path); The AddReplica method adds the MDB (Path=DN) to the replica list for the folder. |
| Copy Method |
[implemented] void Copy( [IN] string FriendlyUrl); The Copy method copies the folder to another location in the hierarchy. |
| Move Method |
[implemented] void Move( [IN] string FriendlyUrl); The Move method moves the folder within the hierarchy. |
| PropagateSettings Method |
[implemented] void PropagateSettings(
[IN,
Bitmap{"0", "1", "2", "3",
"4", "5", "6", "7", "8", "9",
"10", "11"},
BitValues{"AdministrativeRights",
"AgeLimits", "DeletedItemLifetime",
"FolderRights", "IsPerUserReadDisabled",
"IsMailEnabled", "ReplicaList",
"ReplicationMessagePriority",
"ReplicationSchedule", "PublishInAddressBook",
"StorageLimits"}] uint32 Settings,
[IN,
OPTIONAL] boolean StopOnError = TRUE);
The PropagateSettings method propagates the folder settings to all of its children. |
| RemoveReplica Method |
[implemented] void RemoveReplica( [IN] string Path); The RemoveReplica method removes the MDB (in Path=DN format) from the replica list for the folder. |
| Rename Method |
[implemented] void Rename( [IN] string Name); The Rename method renames the folder. |
| SendChanges Method |
[implemented] void SendChanges( [IN] uint32 Days, [IN] string Paths[]); The SendChanges method sends all folder modifications to the folder replicas specified in the Paths parameter. |
| Synchronize Method |
[implemented] void Synchronize(); The Synchronize method forces the folder to request any outstanding change notifications it may have. |
Associations
This class has no associations.
VBScript Example
The following example shows how to retrieve a list of Exchange_PublicFolder instances, and how to retrieve all the associated properties.
'===============================================================
' Purpose: Display each Exchange_PublicFolder found for Exchange server,
' and show all properties on the Exchange_PublicFolder
' objects
' Change: cComputerName [string] the computer to access
' Output: Displays the name of each Exchange_PublicFolder and properties
'===============================================================
On Error Resume Next
Dim cComputerName
Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_PublicFolder"
cComputerName = "MyComputerNETBIOSName"
Dim strWinMgmts ' Connection string for WMI
Dim objWMIExchange ' Exchange Namespace WMI object
Dim listExchange_PublicFolders ' ExchangeLogons collection
Dim objExchange_PublicFolder ' 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 ExchangeClusterResource 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
' ExchangeLogon instances in the Exchange namespace.
Set listExchange_PublicFolders = objWMIExchange.InstancesOf(cWMIInstance)
'
' Were any Exchange_PublicFolder Instances returned?
If (listExchange_PublicFolders.count > 0) Then
' If yes, do the following:
' Iterate through the list of Exchange_PublicFolder objects.
For Each objExchange_PublicFolder in listExchange_PublicFolders
Wscript.Echo""
Wscript.Echo""
'
' Display the value of the AddressBookName property.
WScript.echo "AddressBookName = "& _
" ["&TypeName(objExchange_PublicFolder.AddressBookName)&"] "& _
objExchange_PublicFolder.AddressBookName
'
'
' Display the value of the AdministrativeNote property.
WScript.echo "AdministrativeNote = "& _
" ["&TypeName(objExchange_PublicFolder.AdministrativeNote)&"] "& _
objExchange_PublicFolder.AdministrativeNote
'
'
' Display the value of the AdminSecurityDescriptor property.
WScript.echo "AdminSecurityDescriptor = "& _
" ["&TypeName(objExchange_PublicFolder.AdminSecurityDescriptor)&"] "& _
objExchange_PublicFolder.AdminSecurityDescriptor
'
'
' Display the value of the ADProxyPath property.
WScript.echo "ADProxyPath = "& _
" ["&TypeName(objExchange_PublicFolder.ADProxyPath)&"] "& _
objExchange_PublicFolder.ADProxyPath
'
'
' Display the value of the AssociatedMessageCount property.
WScript.echo "AssociatedMessageCount = "& _
" ["&TypeName(objExchange_PublicFolder.AssociatedMessageCount)&"] "& _
objExchange_PublicFolder.AssociatedMessageCount
'
'
' Display the value of the AttachmentCount property.
WScript.echo "AttachmentCount = "& _
" ["&TypeName(objExchange_PublicFolder.AttachmentCount)&"] "& _
objExchange_PublicFolder.AttachmentCount
'
'
' Display the value of the CategorizationCount property.
WScript.echo "CategorizationCount = "& _
" ["&TypeName(objExchange_PublicFolder.CategorizationCount)&"] "& _
objExchange_PublicFolder.CategorizationCount
'
'
' Display the value of the Comment property.
WScript.echo "Comment = "& _
" ["&TypeName(objExchange_PublicFolder.Comment)&"] "& _
objExchange_PublicFolder.Comment
'
'
' Display the value of the ContactCount property.
WScript.echo "ContactCount = "& _
" ["&TypeName(objExchange_PublicFolder.ContactCount)&"] "& _
objExchange_PublicFolder.ContactCount
'
'
' Display the value of the ContainsRules property.
WScript.echo "ContainsRules = "& _
" ["&TypeName(objExchange_PublicFolder.ContainsRules)&"] "& _
objExchange_PublicFolder.ContainsRules
'
'
' Display the value of the CreationTime property.
WScript.echo "CreationTime = "& _
" ["&TypeName(objExchange_PublicFolder.CreationTime)&"] "& _
objExchange_PublicFolder.CreationTime
'
'
' Display the value of the DeletedItemLifetime property.
WScript.echo "DeletedItemLifetime = "& _
" ["&TypeName(objExchange_PublicFolder.DeletedItemLifetime)&"] "& _
objExchange_PublicFolder.DeletedItemLifetime
'
'
' Display the value of the FolderTree property.
WScript.echo "FolderTree = "& _
" ["&TypeName(objExchange_PublicFolder.FolderTree)&"] "& _
objExchange_PublicFolder.FolderTree
'
'
' Display the value of the FriendlyUrl property.
WScript.echo "FriendlyUrl = "& _
" ["&TypeName(objExchange_PublicFolder.FriendlyUrl)&"] "& _
objExchange_PublicFolder.FriendlyUrl
'
'
' Display the value of the HasChildren property.
WScript.echo "HasChildren = "& _
" ["&TypeName(objExchange_PublicFolder.HasChildren)&"] "& _
objExchange_PublicFolder.HasChildren
'
'
' Display the value of the HasLocalReplica property.
WScript.echo "HasLocalReplica = "& _
" ["&TypeName(objExchange_PublicFolder.HasLocalReplica)&"] "& _
objExchange_PublicFolder.HasLocalReplica
'
'
' Display the value of the IsMailEnabled property.
WScript.echo "IsMailEnabled = "& _
" ["&TypeName(objExchange_PublicFolder.IsMailEnabled)&"] "& _
objExchange_PublicFolder.IsMailEnabled
'
'
' Display the value of the IsNormalFolder property.
WScript.echo "IsNormalFolder = "& _
" ["&TypeName(objExchange_PublicFolder.IsNormalFolder)&"] "& _
objExchange_PublicFolder.IsNormalFolder
'
'
' Display the value of the IsPerUserReadDisabled property.
WScript.echo "IsPerUserReadDisabled = "& _
" ["&TypeName(objExchange_PublicFolder.IsPerUserReadDisabled)&"] "& _
objExchange_PublicFolder.IsPerUserReadDisabled
'
'
' Display the value of the IsSearchFolder property.
WScript.echo "IsSearchFolder = "& _
" ["&TypeName(objExchange_PublicFolder.IsSearchFolder)&"] "& _
objExchange_PublicFolder.IsSearchFolder
'
'
' Display the value of the IsSecureInSite property.
WScript.echo "IsSecureInSite = "& _
" ["&TypeName(objExchange_PublicFolder.IsSecureInSite)&"] "& _
objExchange_PublicFolder.IsSecureInSite
'
'
' Display the value of the LastAccessTime property.
WScript.echo "LastAccessTime = "& _
" ["&TypeName(objExchange_PublicFolder.LastAccessTime)&"] "& _
objExchange_PublicFolder.LastAccessTime
'
'
' Display the value of the LastModificationTime property.
WScript.echo "LastModificationTime = "& _
" ["&TypeName(objExchange_PublicFolder.LastModificationTime)&"] "& _
objExchange_PublicFolder.LastModificationTime
'
'
' Display the value of the MaximumItemSize property.
WScript.echo "MaximumItemSize = "& _
" ["&TypeName(objExchange_PublicFolder.MaximumItemSize)&"] "& _
objExchange_PublicFolder.MaximumItemSize
'
'
' Display the value of the MessageCount property.
WScript.echo "MessageCount = "& _
" ["&TypeName(objExchange_PublicFolder.MessageCount)&"] "& _
objExchange_PublicFolder.MessageCount
'
'
' Display the value of the MessageWithAttachmentsCount property.
WScript.echo "MessageWithAttachmentsCount= "& _
" ["&TypeName(objExchange_PublicFolder.MessageWithAttachmentsCount)&"] "& _
objExchange_PublicFolder.MessageWithAttachmentsCount
'
'
' Display the value of the Name property.
WScript.echo "Name = "& _
" ["&TypeName(objExchange_PublicFolder.Name)&"] "& _
objExchange_PublicFolder.Name
'
'
' Display the value of the NormalMessageSize property.
WScript.echo "NormalMessageSize = "& _
" ["&TypeName(objExchange_PublicFolder.NormalMessageSize)&"] "& _
objExchange_PublicFolder.NormalMessageSize
'
'
' Display the value of the OwnerCount property.
WScript.echo "OwnerCount = "& _
" ["&TypeName(objExchange_PublicFolder.OwnerCount)&"] "& _
objExchange_PublicFolder.OwnerCount
'
'
' Display the value of the ParentFriendlyUrl property.
WScript.echo "ParentFriendlyUrl = "& _
" ["&TypeName(objExchange_PublicFolder.ParentFriendlyUrl)&"] "& _
objExchange_PublicFolder.ParentFriendlyUrl
'
'
' Display the value of the Path property.
WScript.echo "Path = "& _
" ["&TypeName(objExchange_PublicFolder.Path)&"] "& _
objExchange_PublicFolder.Path
'
'
' Display the value of the ProhibitPostLimit property.
WScript.echo "ProhibitPostLimit = "& _
" ["&TypeName(objExchange_PublicFolder.ProhibitPostLimit)&"] "& _
objExchange_PublicFolder.ProhibitPostLimit
'
'
' Display the value of the PublishInAddressBook property.
WScript.echo "PublishInAddressBook = "& _
" ["&TypeName(objExchange_PublicFolder.PublishInAddressBook)&"] "& _
objExchange_PublicFolder.PublishInAddressBook
'
'
' Display the value of the RecipientCountOnAssociatedMessages property.
WScript.echo "RecipientCountOnAssociatedMessages= "& _
" ["&TypeName(objExchange_PublicFolder.RecipientCountOnAssociatedMessages)&"] "& _
objExchange_PublicFolder.RecipientCountOnAssociatedMessages
'
'
' Display the value of the RecipientCountOnNormalMessages property.
WScript.echo "RecipientCountOnNormalMessages= "& _
" ["&TypeName(objExchange_PublicFolder.RecipientCountOnNormalMessages)&"] "& _
objExchange_PublicFolder.RecipientCountOnNormalMessages
'
'
' Display the value of the ReplicaAgeLimit property.
WScript.echo "ReplicaAgeLimit = "& _
" ["&TypeName(objExchange_PublicFolder.ReplicaAgeLimit)&"] "& _
objExchange_PublicFolder.ReplicaAgeLimit
'
'
' Display the value of the ReplicaList property.
WScript.echo "ReplicaList = "& _
" ["&TypeName(objExchange_PublicFolder.ReplicaList)&"] "& _
objExchange_PublicFolder.ReplicaList
'
'
' Display the value of the ReplicationMessagePriority property.
WScript.echo "ReplicationMessagePriority= "& _
" ["&TypeName(objExchange_PublicFolder.ReplicationMessagePriority)&"] "& _
objExchange_PublicFolder.ReplicationMessagePriority
'
'
' Display the value of the ReplicationSchedule property.
WScript.echo "ReplicationSchedule = "& _
" ["&TypeName(objExchange_PublicFolder.ReplicationSchedule)&"] "& _
objExchange_PublicFolder.ReplicationSchedule
'
'
' Display the value of the ReplicationStyle property.
WScript.echo "ReplicationStyle = "& _
" ["&TypeName(objExchange_PublicFolder.ReplicationStyle)&"] "& _
objExchange_PublicFolder.ReplicationStyle
'
'
' Display the value of the RestrictionCount property.
WScript.echo "RestrictionCount = "& _
" ["&TypeName(objExchange_PublicFolder.RestrictionCount)&"] "& _
objExchange_PublicFolder.RestrictionCount
'
'
' Display the value of the SecurityDescriptor property.
WScript.echo "SecurityDescriptor = "& _
" ["&TypeName(objExchange_PublicFolder.SecurityDescriptor)&"] "& _
objExchange_PublicFolder.SecurityDescriptor
'
'
' Display the value of the StorageLimitStyle property.
WScript.echo "StorageLimitStyle = "& _
" ["&TypeName(objExchange_PublicFolder.StorageLimitStyle)&"] "& _
objExchange_PublicFolder.StorageLimitStyle
'
'
' Display the value of the TargetAddress property.
WScript.echo "TargetAddress = "& _
" ["&TypeName(objExchange_PublicFolder.TargetAddress)&"] "& _
objExchange_PublicFolder.TargetAddress
'
'
' Display the value of the TotalMessageSize property.
WScript.echo "TotalMessageSize = "& _
" ["&TypeName(objExchange_PublicFolder.TotalMessageSize)&"] "& _
objExchange_PublicFolder.TotalMessageSize
'
'
' Display the value of the Url property.
WScript.echo "Url = "& _
" ["&TypeName(objExchange_PublicFolder.Url)&"] "& _
objExchange_PublicFolder.Url
'
'
' Display the value of the UsePublicStoreAgeLimits property.
WScript.echo "UsePublicStoreAgeLimits = "& _
" ["&TypeName(objExchange_PublicFolder.UsePublicStoreAgeLimits)&"] "& _
objExchange_PublicFolder.UsePublicStoreAgeLimits
'
'
' Display the value of the UsePublicStoreDeletedItemLifetime property.
WScript.echo "UsePublicStoreDeletedItemLifetime= "& _
" ["&TypeName(objExchange_PublicFolder.UsePublicStoreDeletedItemLifetime)&"] "& _
objExchange_PublicFolder.UsePublicStoreDeletedItemLifetime
'
'
' Display the value of the WarningLimit property.
WScript.echo "WarningLimit = "& _
" ["&TypeName(objExchange_PublicFolder.WarningLimit)&"] "& _
objExchange_PublicFolder.WarningLimit
'
Next
Else
' If no Exchange_PublicFolder instances were returned,
' display that.
WScript.Echo "WARNING: No Exchange_PublicFolder instances were returned."
End If
End If