The ExchangeQueue WMI class has properties that return information about the dynamic queues created to transfer individual messages between mail servers. An ExchangeQueue is part of an ExchangeLink. ExchangeQueue objects are not the same as the queues listed in the Exchange System Manager.
The ExchangeQueueProvider supplies instances of the ExchangeQueue class.
The ExchangeQueue class does not extend any other class.
| Property | Description |
|---|
| LinkName Property | The LinkName property specifies the name of the link in which this queue is contained. |
| ProtocolName Property | [key] string ProtocolName; The ProtocolName property specifies the transmission protocol for the queue. |
| QueueName Property | The QueueName property specifies the name of the queue. |
| VirtualServerName Property | [key] string VirtualServerName; The value of the VirtualServerName property is the integer number of the virtual machine that is the source of the queue. This number is the
Microsoft® Active Directory® common name (CN) for the virtual server object. |
| CanEnumAll Property | The CanEnumAll property, when True, specifies that the queue can enumerate all of the messages that it has waiting for transmission. The CanEnumAll property corresponds to the thirty-first bit (0x40000000) of the MsgEnumFlagsSupported property. |
| CanEnumFailed Property | The CanEnumFailed property, when True, specifies that the queue can enumerate the messages that it has waiting for transmission that it was unable to transfer. The CanEnumFailed property corresponds to the ninth bit (0x00000100) of the MsgEnumFlagsSupported property. |
| CanEnumFirstNMessages Property | boolean CanEnumFirstNMessages; The CanEnumFirstNMessages property, when True, specifies that the queue can enumerate the first N messages that it has waiting for transmission. The CanEnumFirstNMessages property corresponds to the first bit (0x00000001) of the MsgEnumFlagsSupported property. |
| CanEnumFrozen Property | The CanEnumFrozen property, when True, specifies that the queue can enumerate messages that it has waiting for transmission that have been frozen. The CanEnumFrozen property corresponds to the sixth bit (0x00000020) of the MsgEnumFlagsSupported property. |
| CanEnumInvertSense Property | boolean CanEnumInvertSense; The CanEnumInvertSense property, when True, specifies that the queue can enumerate messages that it has waiting for transmission that do not match the criteria requested. For example, requesting the oldest messages while inverting the request sense would return the newest messages. The CanEnumInvertSense property corresponds to the thirty-second bit (0x80000000) of the MsgEnumFlagsSupported property. |
| CanEnumLargerThan Property | boolean CanEnumLargerThan; The CanEnumLargerThan property, when True, specifies that the queue can enumerate the messages that it has waiting for transmission that are larger than a specified value. The CanEnumLargerThan property corresponds to the fourth bit (0x00000008) of the MsgEnumFlagsSupported property. |
| CanEnumNLargestMessages Property | boolean CanEnumNLargestMessages; The CanEnumNLargestMessages property, when True, specifies that the queue can enumerate the specified number of the largest messages that it has waiting for transmission. The CanEnumNLargestMessages property corresponds to the seventh bit (0x00000040) of the MsgEnumFlagsSupported property. |
| CanEnumNOldestMessages Property | boolean CanEnumNOldestMessages; The CanEnumNOldestMessages property, when True, specifies that the queue can enumerate the specified number of the oldest messages that it has waiting for transmission. The CanEnumNOldestMessages property corresponds to the eighth bit (0x00000080) of the MsgEnumFlagsSupported property. |
| CanEnumOlderThan Property | boolean CanEnumOlderThan; The CanEnumOlderThan property, when True, specifies that the queue can enumerate the messages that it has waiting for transmission that arrived before a specified date and time. The CanEnumOlderThan property corresponds to the fifth bit (0x00000010) of the MsgEnumFlagsSupported property. |
| CanEnumRecipient Property | boolean CanEnumRecipient; The CanEnumRecipient property, when True, specifies that the queue can enumerate the recipients of messages that it has waiting for transmission. The CanEnumRecipient property corresponds to the fourth bit (0x00000004) of the MsgEnumFlagsSupported property. |
| CanEnumSender Property | The CanEnumSender property, when True, specifies that the queue can enumerate the senders of messages that it has waiting for transmission. The CanEnumSender property corresponds to the second bit (0x00000002) of the MsgEnumFlagsSupported property. |
| GlobalStop Property | The GlobalStop property specifies whether the queue is currently stopped. |
| IncreasingTime Property | The IncreasingTime property specifies the amount of time, in milliseconds, that the number of messages waiting to be transferred by the queue has been increasing. |
| MsgEnumFlagsSupported Property | uint32 MsgEnumFlagsSupported; The MsgEnumFlagsSupported property specifies a bit-mapped set of flags that indicate what types of objects can be enumerated. The individual bits of this property are available as the queue CanEnum
properties in this class. |
| NumberOfMessages Property | The NumberOfMessages property specifies the number of messages that are waiting for transmission by the queue. |
| SizeOfQueue Property | The SizeOfQueue property specifies the total size of all messages in the queue, in bytes. |
| Version Property | The Version property specifies the version number of the Microsoft Exchange software. |
| VirtualMachine Property | The VirtualMachine property specifies the name of the virtual machine that is the source of the link. |
This class has no methods.
This class has no associations.
The following example shows how to retrieve a list of ExchangeQueue instances, and how to retrieve the associated properties.
'===============================================================
' Name: ShowQueue_AllProperties
' Purpose: Display each Queue found for the Exchange server,
' and show all properties on the ExchangeQueue
' objects.
' Input: strComputerName [string] the computer to access
' Output: Displays the name of each Queue and properties.
'===============================================================
Public Sub ShowQueue_AllProperties ( strComputerName )
Const cWMINameSpace = "root/cimv2/applications/exchange"
Const cWMIInstance = "ExchangeQueue"
Dim strWinMgmts ' Connection string for WMI
Dim objWMIExchange ' Exchange Namespace WMI object
Dim listQueues ' ExchangeQueue collection
Dim objExchangeQueue ' A single ExchangeQueue WMI object
' Create the object string, indicating WMI (winmgmts), using the
' current user credentials (impersonationLevel=impersonate),
' on the computer passed to the function in strComputerName, and
' using the CIM namespace for the ExchangeQueue provider.
strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & _
strComputerName & "/" & cWMINameSpace
'
' Get an object using the string you just created.
Set objWMIExchange = GetObject(strWinMgmts)
'
' The Resources that currently exist appear as a list of
' ExchangeQueue instances in the Exchange namespace.
Set listQueues = objWMIExchange.InstancesOf(cWMIInstance)
'
' Were any ExchangeQueue Instances returned?
if (listQueues.count > 0) then
' If yes, do the following:
' Iterate through the list of ExchangeQueue objects.
For each objExchangeQueue in listQueues
'
' Display the value of the LinkName property.
WScript.echo "LinkName = " & _
"[" & TypeName(objExchangeQueue.LinkName) & "] " & _
objExchangeQueue.LinkName
'
' Display the value of the ProtocolName property.
WScript.echo " ProtocolName = [" & _
TypeName(objExchangeQueue.ProtocolName) & "] " & _
objExchangeQueue.ProtocolName
'
' Display the value of the QueueName property.
WScript.echo " QueueName = [" & _
TypeName(objExchangeQueue.QueueName) & "] " & _
objExchangeQueue.QueueName
'
' Display the value of the VirtualServerName property.
WScript.echo " VirtualServerName = [" & _
TypeName(objExchangeQueue.VirtualServerName) & "] " & _
objExchangeQueue.VirtualServerName
'
' Display the value of the GlobalStop property.
WScript.echo " GlobalStop = [" & _
TypeName(objExchangeQueue.GlobalStop) & "] " & _
objExchangeQueue.GlobalStop
'
' Display the value of the IncreasingTime property.
WScript.echo " IncreasingTime = [" & _
TypeName(objExchangeQueue.IncreasingTime) & "] " & _
objExchangeQueue.IncreasingTime
'
' Display the value of the NumberOfMessages property.
WScript.echo " NumberOfMessages = [" & _
TypeName(objExchangeQueue.NumberOfMessages) & "] " & _
objExchangeQueue.NumberOfMessages
'
' Display the value of the SizeOfQueue property.
WScript.echo " SizeOfQueue = [" & _
TypeName(objExchangeQueue.SizeOfQueue) & "] " & _
objExchangeQueue.SizeOfQueue
'
' Display the value of the Version property.
WScript.echo " Version = [" & _
TypeName(objExchangeQueue.Version) & "] " & _
objExchangeQueue.Version
'
' Display the value of the VirtualMachine property.
WScript.echo " VirtualMachine = [" & _
TypeName(objExchangeQueue.VirtualMachine) & "] " & _
objExchangeQueue.VirtualMachine
'
' Display the value of the MsgEnumFlagsSupported property.
WScript.echo " MsgEnumFlagsSupported = [" & _
TypeName(objExchangeQueue.MsgEnumFlagsSupported) & "] 0x" & _
Hex(objExchangeQueue.MsgEnumFlagsSupported)
'
WScript.echo " (Least Significant Bit)"
'
' Display the value of the CanEnumFailed property.
WScript.echo " CanEnumFailed = [" & _
TypeName(objExchangeQueue.CanEnumFailed) & "] " & _
objExchangeQueue.CanEnumFailed
'
' Display the value of the CanEnumSender property.
WScript.echo " CanEnumSender = [" & _
TypeName(objExchangeQueue.CanEnumSender) & "] " & _
objExchangeQueue.CanEnumSender
'
' Display the value of the CanEnumRecipient property.
WScript.echo " CanEnumRecipient = [" & _
TypeName(objExchangeQueue.CanEnumRecipient) & "] " & _
objExchangeQueue.CanEnumRecipient
'
' Display the value of the CanEnumLargerThan property.
WScript.echo " CanEnumLargerThan = [" & _
TypeName(objExchangeQueue.CanEnumLargerThan) & "] " & _
objExchangeQueue.CanEnumLargerThan
'
' Display the value of the CanEnumOlderThan property.
WScript.echo " CanEnumOlderThan = [" & _
TypeName(objExchangeQueue.CanEnumOlderThan) & "] " & _
objExchangeQueue.CanEnumOlderThan
'
' Display the value of the CanEnumFrozen property.
WScript.echo " CanEnumFrozen = [" & _
TypeName(objExchangeQueue.CanEnumFrozen) & "] " & _
objExchangeQueue.CanEnumFrozen
'
' Display the value of the CanEnumNLargestMessages property.
WScript.echo " CanEnumNLargestMessages = [" & _
TypeName(objExchangeQueue.CanEnumNLargestMessages) & "] " & _
objExchangeQueue.CanEnumNLargestMessages
'
' Display the value of the CanEnumNOldestMessages property.
WScript.echo " CanEnumNOldestMessages = [" & _
TypeName(objExchangeQueue.CanEnumNOldestMessages) & "] " & _
objExchangeQueue.CanEnumNOldestMessages
'
' Display the value of the CanEnumFirstNMessages property.
WScript.echo " CanEnumFirstNMessages = [" & _
TypeName(objExchangeQueue.CanEnumFirstNMessages) & "] " & _
objExchangeQueue.CanEnumFirstNMessages
'
' Display the value of the CanEnumAll property.
WScript.echo " CanEnumAll = [" & _
TypeName(objExchangeQueue.CanEnumAll) & "] " & _
objExchangeQueue.CanEnumAll
'
' Display the value of the CanEnumInvertSense property.
WScript.echo " CanEnumInvertSense = [" & _
TypeName(objExchangeQueue.CanEnumInvertSense) & "] " & _
objExchangeQueue.CanEnumInvertSense
'
WScript.echo " (Most Significant Bit)"
'
' Move to the next ExchangeQueue.
Next
else
' If no ExchangeQueue instances were returned,
' display that.
WScript.Echo "No ExchangeQueue instances were returned."
end if
end Sub