Exchange_QueuedMessage Class

Exchange_QueuedMessage 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.

The Exchange_QueuedMessage WMI class is the base class for the Exchange_QueuedX400Message and Exchange_QueuedSMTPMessage classes. The Exchange_QueuedMessage class provides information about messages that reside in Microsoft® Exchange queues.

Namespace

\\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_QueuedMessage

Provider

The CIM_LogicalElement provider supplies instances of the Exchange_QueuedMessage class.

Origin

The Exchange_QueuedMessage class extends the CIM_LogicalElement class.

Qualifiers

Abstract

Properties

Property Description
LinkId Property
[key, read] String LinkId;

The LinkId property indicates the identifier for the link that contains the queued message.

LinkName Property
[key, read] String LinkName;

The LinkName property indicates the name of the link that contains the queued message.

MessageId Property
[key, read] String MessageId;

The MessageId property indicates the identifier of the queued message.

ProtocolName Property
[key,
 read] String ProtocolName;

The ProtocolName property indicates the transmission protocol for the queued message.

QueueId Property
[key, read] String QueueId;

The QueueId property indicates the identifier of the queue that the queued message is on.

QueueName Property
[key, read] String QueueName;

The QueueName property indicates the name of the queue that contains the message.

VirtualMachine Property
[key,
 read] String VirtualMachine;

The VirtualMachine property indicates the name of the virtual machine that contains the queued message.

VirtualServerName Property
[key,
 read] String VirtualServerName;

The VirtualServerName property indicates the name of the virtual server that contains the queued message.

ActionDeleteNDR Property
[read] Boolean ActionDeleteNDR;

The ActionDeleteNDR property indicates whether the message supports the DeleteWithNDR method.

ActionDeleteNoNDR Property
[read] Boolean ActionDeleteNoNDR;

The ActionDeleteNoNDR property indicates whether the message supports the DeleteWithoutNDR method.

ActionFreeze Property
[read] Boolean ActionFreeze;

The ActionFreeze property indicates whether the message supports the Freeze method.

ActionThaw Property
[read] Boolean ActionThaw;

The ActionThaw property indicates whether the message supports the Thaw method.

Expiry Property
[read] DateTime Expiry;

The Expiry property indicates the expiration time stamp for the message.

HighPriority Property
[read] Boolean HighPriority;

The HighPriority property indicates whether the message has high priority.

LowPriority Property
[read] Boolean LowPriority;

The LowPriority property indicates whether the message has low priority.

NormalPriority Property
[read] Boolean NormalPriority;

The NormalPriority property indicates whether the message has normal priority.

Received Property
[read] DateTime Received;

The Received property indicates the received time stamp for the message.

RecipientCount Property
[read] Uint32 RecipientCount;

The RecipientCount property indicates the number of recipients in the message.

Recipients Property
[read] String Recipients;

The Recipients property indicates the recipients of the message.

Sender Property
[read] String Sender;

The Sender property indicates the name of the sender.

Size Property
[read,
 Units("KB")] Uint32 Size;

The Size property indicates the size of the message.

StateFlags Property
[read] Uint32 StateFlags;

The StateFlags property contains a mask of all of the state flags for the message.

StateFrozen Property
[read] Boolean StateFrozen;

The StateFrozen property indicates whether the message is in a frozen state.

StateRetry Property
[read] Boolean StateRetry;

The StateRetry property indicates that transmission is being retried for a message that was not delivered successfully.

Subject Property
[read] String Subject;

The Subject property indicates the subject of the message.

Submission Property
[read] DateTime Submission;

The Submission property indicates the submission time stamp for the message.

Version Property
[read] Uint32 Version;

The Version property indicates the version of the Queue Application Programming Interface (QAPI) used to generate the WMI object.

Methods

This class has no methods.

Associations

This class has no associations.

VBScript Example

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

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

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

Dim strWinMgmts		' Connection string for WMI
Dim objWMIExchange	' Exchange Namespace WMI object
Dim listExchange_QueuedMessages	' ExchangeLogons collection
Dim objExchange_QueuedMessage		' 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_QueuedMessage instances in the Exchange namespace.
  Set listExchange_QueuedMessages = objWMIExchange.InstancesOf(cWMIInstance)
  '
  ' Were any Exchange_QueuedMessage Instances returned?
  If (listExchange_QueuedMessages.count > 0) Then
    ' If yes, do the following:
    ' Iterate through the list of Exchange_QueuedMessage objects.
    For Each objExchange_QueuedMessage in listExchange_QueuedMessages
   Wscript.Echo""
   Wscript.Echo""
       '
       ' Display the value of the ActionDeleteNDR property.
       WScript.echo "ActionDeleteNDR          = "& _
        " ["&TypeName(objExchange_QueuedMessage.ActionDeleteNDR)&"] "& _
       objExchange_QueuedMessage.ActionDeleteNDR
       '
       '
       ' Display the value of the ActionDeleteNoNDR property.
       WScript.echo "ActionDeleteNoNDR        = "& _
        " ["&TypeName(objExchange_QueuedMessage.ActionDeleteNoNDR)&"] "& _
       objExchange_QueuedMessage.ActionDeleteNoNDR
       '
       '
       ' Display the value of the ActionFreeze property.
       WScript.echo "ActionFreeze             = "& _
        " ["&TypeName(objExchange_QueuedMessage.ActionFreeze)&"] "& _
       objExchange_QueuedMessage.ActionFreeze
       '
       '
       ' Display the value of the ActionThaw property.
       WScript.echo "ActionThaw               = "& _
        " ["&TypeName(objExchange_QueuedMessage.ActionThaw)&"] "& _
       objExchange_QueuedMessage.ActionThaw
       '
       '
       ' Display the value of the Expiry property.
       WScript.echo "Expiry                   = "& _
        " ["&TypeName(objExchange_QueuedMessage.Expiry)&"] "& _
       objExchange_QueuedMessage.Expiry
       '
       '
       ' Display the value of the HighPriority property.
       WScript.echo "HighPriority             = "& _
        " ["&TypeName(objExchange_QueuedMessage.HighPriority)&"] "& _
       objExchange_QueuedMessage.HighPriority
       '
       '
       ' Display the value of the LinkId property.
       WScript.echo "LinkId                   = "& _
        " ["&TypeName(objExchange_QueuedMessage.LinkId)&"] "& _
       objExchange_QueuedMessage.LinkId
       '
       '
       ' Display the value of the LinkName property.
       WScript.echo "LinkName                 = "& _
        " ["&TypeName(objExchange_QueuedMessage.LinkName)&"] "& _
       objExchange_QueuedMessage.LinkName
       '
       '
       ' Display the value of the LowPriority property.
       WScript.echo "LowPriority              = "& _
        " ["&TypeName(objExchange_QueuedMessage.LowPriority)&"] "& _
       objExchange_QueuedMessage.LowPriority
       '
       '
       ' Display the value of the MessageId property.
       WScript.echo "MessageId                = "& _
        " ["&TypeName(objExchange_QueuedMessage.MessageId)&"] "& _
       objExchange_QueuedMessage.MessageId
       '
       '
       ' Display the value of the NormalPriority property.
       WScript.echo "NormalPriority           = "& _
        " ["&TypeName(objExchange_QueuedMessage.NormalPriority)&"] "& _
       objExchange_QueuedMessage.NormalPriority
       '
       '
       ' Display the value of the ProtocolName property.
       WScript.echo "ProtocolName             = "& _
        " ["&TypeName(objExchange_QueuedMessage.ProtocolName)&"] "& _
       objExchange_QueuedMessage.ProtocolName
       '
       '
       ' Display the value of the QueueId property.
       WScript.echo "QueueId                  = "& _
        " ["&TypeName(objExchange_QueuedMessage.QueueId)&"] "& _
       objExchange_QueuedMessage.QueueId
       '
       '
       ' Display the value of the QueueName property.
       WScript.echo "QueueName                = "& _
        " ["&TypeName(objExchange_QueuedMessage.QueueName)&"] "& _
       objExchange_QueuedMessage.QueueName
       '
       '
       ' Display the value of the Received property.
       WScript.echo "Received                 = "& _
        " ["&TypeName(objExchange_QueuedMessage.Received)&"] "& _
       objExchange_QueuedMessage.Received
       '
       '
       ' Display the value of the RecipientCount property.
       WScript.echo "RecipientCount           = "& _
        " ["&TypeName(objExchange_QueuedMessage.RecipientCount)&"] "& _
       objExchange_QueuedMessage.RecipientCount
       '
       '
       ' Display the value of the Recipients property.
       WScript.echo "Recipients               = "& _
        " ["&TypeName(objExchange_QueuedMessage.Recipients)&"] "& _
       objExchange_QueuedMessage.Recipients
       '
       '
       ' Display the value of the Sender property.
       WScript.echo "Sender                   = "& _
        " ["&TypeName(objExchange_QueuedMessage.Sender)&"] "& _
       objExchange_QueuedMessage.Sender
       '
       '
       ' Display the value of the Size property.
       WScript.echo "Size                     = "& _
        " ["&TypeName(objExchange_QueuedMessage.Size)&"] "& _
       objExchange_QueuedMessage.Size
       '
       '
       ' Display the value of the StateFlags property.
       WScript.echo "StateFlags               = "& _
        " ["&TypeName(objExchange_QueuedMessage.StateFlags)&"] "& _
       objExchange_QueuedMessage.StateFlags
       '
       '
       ' Display the value of the StateFrozen property.
       WScript.echo "StateFrozen              = "& _
        " ["&TypeName(objExchange_QueuedMessage.StateFrozen)&"] "& _
       objExchange_QueuedMessage.StateFrozen
       '
       '
       ' Display the value of the StateRetry property.
       WScript.echo "StateRetry               = "& _
        " ["&TypeName(objExchange_QueuedMessage.StateRetry)&"] "& _
       objExchange_QueuedMessage.StateRetry
       '
       '
       ' Display the value of the Subject property.
       WScript.echo "Subject                  = "& _
        " ["&TypeName(objExchange_QueuedMessage.Subject)&"] "& _
       objExchange_QueuedMessage.Subject
       '
       '
       ' Display the value of the Submission property.
       WScript.echo "Submission               = "& _
        " ["&TypeName(objExchange_QueuedMessage.Submission)&"] "& _
       objExchange_QueuedMessage.Submission
       '
       '
       ' Display the value of the Version property.
       WScript.echo "Version                  = "& _
        " ["&TypeName(objExchange_QueuedMessage.Version)&"] "& _
       objExchange_QueuedMessage.Version
       '
       '
       ' Display the value of the VirtualMachine property.
       WScript.echo "VirtualMachine           = "& _
        " ["&TypeName(objExchange_QueuedMessage.VirtualMachine)&"] "& _
       objExchange_QueuedMessage.VirtualMachine
       '
       '
       ' Display the value of the VirtualServerName property.
       WScript.echo "VirtualServerName        = "& _
        " ["&TypeName(objExchange_QueuedMessage.VirtualServerName)&"] "& _
       objExchange_QueuedMessage.VirtualServerName
       '
    Next
  Else
    ' If no Exchange_QueuedMessage instances were returned,
    ' display that.
    WScript.Echo "WARNING: No Exchange_QueuedMessage instances were returned."
  End If
End If

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.