Export (0) Print
Expand All

Exchange_MessageTrackingEntry Class

Exchange Server 2003

Exchange_MessageTrackingEntry 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_MessageTrackingEntry class provide information about events that have occurred to the message during the time it was under the control of the computer running Microsoft® Exchange Server 2003.

Namespace

\\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_MessageTrackingEntry

Provider

The ExchangeMessageTrackingProvider supplies instances of the Exchange_MessageTrackingEntry class.

Origin

The Exchange_MessageTrackingEntry class extends the CIM_LogicalElement class.

Qualifiers

dynamic

Properties

Property Description
KeyID Property
[key] string KeyID;

The KeyID property uniquely identifies the message log entry. The value is unique among all entries on all servers.

AttemptedPartnerServer Property
[read] string AttemptedPartnerServer;

The AttemptedPartnerServer property indicates the server to which Exchange tried to send a message, but was unable to complete the transfer.

ClientIP Property
[read] string ClientIP;

The ClientIP property indicates the TCP/IP address of the messaging client that originally submitted the message.

ClientName Property
[read] string ClientName;

The ClientName property indicates the name of the messaging client application that submitted the message.

Cost Property
[read] uint32 Cost;

The Cost property indicates the relative effort that is required to transfer the message. There are no specific units used in this property. Higher values indicate that slower network connections must be used, or that a greater number of transfers is required to transfer the message.

DeliveryTime Property
[read,
 Units("seconds")] uint32 DeliveryTime;

The DeliveryTime property indicates the amount of time, in seconds, required to deliver the message.

Encrypted Property
[read] boolean Encrypted;

The Encrypted property indicates, when True, that the message is encrypted.

EntryType Property
[read,
 Values{"Message received through X400",
   "Not used", "Report received",
   "Message submitted", "Not used",
   "Not used", "Message transferred out",
   "Report transferred out", "Message delivered",
   "Report delivered", "Not used",
   "Not used", "Distribution list expanded",
   "Message redirected", "Message rerouted",
   "Server downgraded by MTA",
   "Report absorbed", "Report generated",
   "Unroutable report discarded",
   "Message deleted by administrator",
   "Probe deleted by administrator",
   "Report deleted by administrator",
   "Message delivered locally",
   "Message transferred in over backbone",
   "Message transferred out over backbone",
   "Message transferred out over gateway",
   "Message transferred in over gateway",
   "Report transferred in over gateway",
   "Report transferred out over gateway",
   "Report generated", "SMTP: Message queued outbound",
   "SMTP: Message transferred out",
   "SMTP: Inbound message received",
   "SMTP: Inbound message transferred",
   "SMTP: Message rerouted", "SMTP: Report transferred in",
   "SMTP: Report transferred out",
   "SMTP: Report generated", "SMTP: Report absorbed",
   "SMTP: Message submitted to advanced queue",
   "SMTP: Started outbound transfer of message",
   "SMTP: Message sent to badmail directory",
   "SMTP: Advanced queue failure",
   "SMTP: Message delivered locally",
   "SMTP: Message submitted to categorizer",
   "SMTP: Started message submission to advanced queue",
   "SMTP: Advanced queue failed to deliver message",
   "SMTP Store Driver: Message submitted from store",
   "SMTP Store Driver: Message delivered locally to store",
   "SMTP Store Driver: Message submitted to MTA",
   "SMTP: Non-delivery report (NDR) generated",
     "SMTP: Message transferred out",
     "SMTP: Message scheduled to retry categorization",
     "SMTP: Message categorized and queued for routing",
     "SMTP: Message routed and queued for remote delivery",
     "SMTP: Message scheduled to retry routing",
     "SMTP: Message queued for local delivery",
     "SMTP: Message scheduled to retry local delivery",
     "SMTP: Message routed and queued for gateway delivery"},
   ValueMap{"0", "1", "2", "4",
     "5", "6", "7", "8", "9", "10",
     "18", "23", "26", "28", "29",
     "31", "33", "34", "43", "50",
     "51", "52", "1000", "1001",
     "1002", "1003", "1004", "1005",
     "1006", "1007", "1010", "1011",
     "1012", "1013", "1014", "1015",
     "1016", "1017", "1018", "1019",
     "1020", "1021", "1022", "1023",
     "1024", "1025", "1026", "1027",
     "1028", "1029", "1030", "1031",
     "1032", "1033", "1034", "1035",
     "1036", "1037", "1038"}] uint32 EntryType;

The EntryType property indicates what occurred to cause the message tracking log entry to be created.

ExpansionDL Property
[read] string ExpansionDL;

The ExpansionDL property indicates the name of the Exchange distribution list that was expanded. After the distribution list is expanded, the message recipient list includes the names of the individual members of that distribution list.

LinkedMessageID Property
[read] string LinkedMessageID;

The LinkedMessageID property is the string identifier assigned to the message when it is received by the PartnerServer. This property sometimes has the same value as the MessageID Property.

MessageID Property
[read] string MessageID;

The MessageID property indicates the identifier string for the message. The identifier may be assigned by the messaging client application or by the computer running Exchange 2000 Server.

OriginationTime Property
[read] datetime OriginationTime;

The OriginationTime property indicates the date and time, in coordinated universal time (UTC), when the message was received by Exchange.

PartnerServer Property
[read] string LinkedMessageID;

The PartnerServer property indicates the server to which Exchange transferred the message.

Priority Property
[read] uint32 Priority;

The Priority property specifies the importance of the message, as displayed by the messaging client application.

RecipientAddress Property
[read] string RecipientAddress
[];

The RecipientAddress property is an array that specifies the e-mail addresses of each message recipient.

RecipientCount Property
[read] uint32 RecipientCount;

The RecipientCount property indicates how many recipients are described in this message tracking log entry.

RecipientStatus Property
[read] uint32 RecipientStatus
[];

Each element of the RecipientStatus array indicates the type of message sent regarding the recipient specified in the corresponding array entry of the RecipientAddress property.

SenderAddress Property
[read] string SenderAddress;

The SenderAddress property specifies the e-mail address of the message sender.

ServerIP Property
[read] string ServerIP;

The ServerIP property indicates the TCP/IP address of the computer running Exchange 2000 Server.

ServerName Property
[read] string ServerName;

The ServerName property indicates the name of the virtual server instance that created the message tracking log entry.

Size Property
[read] uint32 Size;

The Size property indicates the message size, including attachments, in bytes.

Subject Property
[read] string Subject;

The Subject property indicates the subject of the message, as found in the Subject: message header.

SubjectID Property
[read] string SubjectID;

The SubjectID property specifies an identifier created by the messaging client application.

TimeLogged Property
[read] datetime TimeLogged;

The TimeLogged property indicates the date and time, in UTC, when the message tracking log entry was created.

Version Property
[read] string Version;

The Version property indicates the version of the service that created the message tracking log entry.

Methods

This class has no methods.

Remarks

The available Exchange_MessageTrackingEntry instances correspond to the entries stored in the Exchange message tracking log files. Log file entries for a specific day can be retrieved by querying for instances having the appropriate TimeLogged Property value. If a log file is deleted or emptied, the entries in that log file will no longer be available as Exchange_MessageTrackingEntry instances.

The TimeLogged Property is the only property indexed by the Exchange_MessageTrackingEntry class. No other Exchange_MessageTracking properties are indexed. When an application uses InstancesOf to enumerate the log entries, or uses ExecQuery without a WHERE clause that restricts the range of the TimeLogged Property, the provider examines each log entry to determine whether the entry will be returned. To improve application performance, limit the range of the TimeLogged Property by specifying both lower and upper bounds in the query string WHERE clause passed to the ExecQuery method.

Associations

This class has no associations.

Selecting Instances Using VBScript

The following example shows how to retrieve a list of Exchange_MessageTrackingEntry instances, and the associated properties, using the ExecQuery method.

'===============================================================
' Name:      ShowExchange_MessageTrackingEntry_Query_AllProperties
' Purpose:   Display each Exchange_MessageTrackingEntry found for the
'            specified Exchange server, and show all
'            properties on the Exchange_MessageTrackingEntry
'            instances.
' Input:     strComputerName [string] the computer to access
'            intHoursToShow [integer] the number of hours before the
'            present time for which log entries will be shown.
'            intUTCOffset [integer] Local time offset from UTC
' Output:    Displays the KeyID of each Exchange_MessageTrackingEntry
'            and properties.
'
'===============================================================
' IMPORTANT: This script may take a very long time to execute when run
'            on a heavily used Exchange server, or when a very long
'            intHoursToShow is given. This script uses the ExecQuery
'            programming style, and gives a lower limit to the
'            TimeLogged property. It is recommended that applications
'            specify lower and upper bounds for the TimeLogged
'            property to improve performance.
'===============================================================
Public Sub ShowExchange_MessageTrackingEntry_Query_AllProperties ( _
  strComputerName, intHoursToShow, intUTCOffset )

Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_MessageTrackingEntry"

Dim strWinMgmts              ' Connection string for WMI
Dim objWMIExchange           ' Exchange Namespace WMI object
Dim listExchange_MessageTrackingEntries ' Exchange_MessageTrackingEntry
                             ' collection
Dim objExchange_MessageTrackingEntry ' An Exchange_MessageTrackingEntry
                             ' instance
Dim intRecipientIndex        ' A counter for the recipient and
                             ' recipient status arrays
Dim strWQLQuery              ' A string for the Query
Dim strQueryLanguage         ' A string for the Query Language
Dim dtListFrom               ' Date/Time start for log entry inclusion
Dim strStartDateTime         ' WMI time stamp for log entry inclusion

' 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 Exchange_MessageTrackingEntry
' provider.
strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & _
   strComputerName & "/" & cWMINameSpace
'
' Get an object using the string you just created.
Set objWMIExchange =  GetObject(strWinMgmts)
'
'

' Create a date in the string form expected by WMI.
' For example, 12 November 2001, 4:29:24 = 20011120042924.000000+000
' Time stamps in WMI are compared as strings, and the TimeLogged
' property is always given with zero offset from UTC.
'
' Get the UTC-adjusted log-entry cutoff time.
dtListFrom = DateAdd("h",(intHoursToShow - intUTCOffset),now)
'
' Initialize the time stamp string with the year.
strStartDateTime = year(dtListFrom)
' Add a leading zero for the month, if needed.
if (Month(dtListFrom) < 10) then strStartDateTime = strStartDateTime & "0"
' Add the month value to the string.
strStartDateTime = strStartDateTime & Month(dtListFrom)
' Add a leading zero for the day, if needed.
if (Day(dtListFrom) < 10) then strStartDateTime = strStartDateTime & "0"
' Add the day value to the string.
strStartDateTime = strStartDateTime & Day(dtListFrom)
' Add a leading zero for the hours, if needed.
if (Hour(dtListFrom) < 10) then strStartDateTime = strStartDateTime & "0"
' Add the hours value to the string.
strStartDateTime = strStartDateTime & Hour(dtListFrom)
' Add a leading zero for the minutes, if needed.
if (Minute(dtListFrom) < 10) then strStartDateTime = strStartDateTime & "0"
' Add the minutes value to the string.
strStartDateTime = strStartDateTime & Minute(dtListFrom)
' Add a leading zero for the seconds.
if (Second(dtListFrom) < 10) then strStartDateTime = strStartDateTime & "0"
' Add the seconds value to the string, the part for fractional
' seconds, and an empty UTC offset. The empty UTC offset is
' needed to match the offset used by the TimeLogged property.
strStartDateTime = strStartDateTime & Second(dtListFrom) & ".000000+000"
'
' Construct the WQL Query string. Note the double-quotes surrounding the
' previously constructed date string.
strWQLQuery = "select * from Exchange_MessageTrackingEntry WHERE " & _
    "TimeLogged > """ & strStartDateTime & """"

' Display the query string you just constructed.
WScript.echo "The query string to be used: "
WScript.echo "    " & strWQLQuery

' Set the WMI Query Language (WQL) indicator.
strQueryLanguage = "WQL"

' The instances are returned as a list of Exchange_MessageTrackingEntry
' instances in the Exchange namespace.
Set listExchange_MessageTrackingEntries = objWMIExchange.ExecQuery ( _
    strWQLQuery, strQueryLanguage)

' Indicate how many items were returned by the query.
WScript.echo "Number of items returned: " & _
    listExchange_MessageTrackingEntries.Count
'
' Iterate through the list of Exchange_MessageTrackingEntry objects.
For each objExchange_MessageTrackingEntry in _
   listExchange_MessageTrackingEntries
   '
   ' Display the value of the KeyID property.
   WScript.echo "KeyID = " & _
    "[" & TypeName(objExchange_MessageTrackingEntry.KeyID) & "] " & _
     objExchange_MessageTrackingEntry.KeyID
   '
   ' Display the value of the TimeLogged property.
   WScript.echo "    TimeLogged               = [" & _
     TypeName(objExchange_MessageTrackingEntry.TimeLogged) & "] " & _
    objExchange_MessageTrackingEntry.TimeLogged
   '
   ' Display the value of the AttemptedPartnerServer property.
   WScript.echo "    AttemptedPartnerServer   = [" & _
     TypeName(objExchange_MessageTrackingEntry.AttemptedPartnerServer) & "] " & _
    objExchange_MessageTrackingEntry.AttemptedPartnerServer
   '
   ' Display the value of the ClientIP property.
   WScript.echo "    ClientIP                 = [" & _
     TypeName(objExchange_MessageTrackingEntry.ClientIP) & "] " & _
    objExchange_MessageTrackingEntry.ClientIP
   '
   ' Display the value of the ClientName property.
   WScript.echo "    ClientName               = [" & _
     TypeName(objExchange_MessageTrackingEntry.ClientName) & "] " & _
    objExchange_MessageTrackingEntry.ClientName
   '
   ' Display the value of the Cost property.
   WScript.echo "    Cost                     = [" & _
     TypeName(objExchange_MessageTrackingEntry.Cost) & "] " & _
    objExchange_MessageTrackingEntry.Cost
   '
   ' Display the value of the DeliveryTime property.
   WScript.echo "    DeliveryTime             = [" & _
     TypeName(objExchange_MessageTrackingEntry.DeliveryTime) & "] " & _
    objExchange_MessageTrackingEntry.DeliveryTime
   '
   ' Display the value of the Encrypted property.
   WScript.echo "    Encrypted                = [" & _
     TypeName(objExchange_MessageTrackingEntry.Encrypted) & "] " & _
    objExchange_MessageTrackingEntry.Encrypted
   '
   ' Display the value of the EntryType property.
   WScript.echo "    EntryType                = [" & _
     TypeName(objExchange_MessageTrackingEntry.EntryType) & "] " & _
    objExchange_MessageTrackingEntry.EntryType
   '
   ' Display the value of the ExpansionDL property.
   WScript.echo "    ExpansionDL              = [" & _
     TypeName(objExchange_MessageTrackingEntry.ExpansionDL) & "] " & _
    objExchange_MessageTrackingEntry.ExpansionDL
   '
   ' Display the value of the LinkedMessageID property.
   WScript.echo "    LinkedMessageID          = [" & _
     TypeName(objExchange_MessageTrackingEntry.LinkedMessageID) & "] " & _
    objExchange_MessageTrackingEntry.LinkedMessageID
   '
   ' Display the value of the MessageID property.
   WScript.echo "    MessageID                = [" & _
     TypeName(objExchange_MessageTrackingEntry.MessageID) & "] " & _
    objExchange_MessageTrackingEntry.MessageID
   '
   ' Display the value of the OriginationTime property.
   WScript.echo "    OriginationTime          = [" & _
     TypeName(objExchange_MessageTrackingEntry.OriginationTime) & "] " & _
    objExchange_MessageTrackingEntry.OriginationTime
   '
   ' Display the value of the PartnerServer property.
   WScript.echo "    PartnerServer            = [" & _
     TypeName(objExchange_MessageTrackingEntry.PartnerServer) & "] " & _
    objExchange_MessageTrackingEntry.PartnerServer
   '
   ' Display the value of the Priority property.
   WScript.echo "    Priority                 = [" & _
     TypeName(objExchange_MessageTrackingEntry.Priority) & "] " & _
    objExchange_MessageTrackingEntry.Priority
   '
   ' Display the value of the SenderAddress property.
   WScript.echo "    SenderAddress            = [" & _
     TypeName(objExchange_MessageTrackingEntry.SenderAddress) & "] " & _
    objExchange_MessageTrackingEntry.SenderAddress
   '
   ' Display the value of the ServerIP property.
   WScript.echo "    ServerIP                 = [" & _
     TypeName(objExchange_MessageTrackingEntry.ServerIP) & "] " & _
    objExchange_MessageTrackingEntry.ServerIP
   '
   ' Display the value of the ServerName property.
   WScript.echo "    ServerName               = [" & _
     TypeName(objExchange_MessageTrackingEntry.ServerName) & "] " & _
    objExchange_MessageTrackingEntry.ServerName
   '
   ' Display the value of the Size property.
   WScript.echo "    Size                     = [" & _
     TypeName(objExchange_MessageTrackingEntry.Size) & "] " & _
    objExchange_MessageTrackingEntry.Size
   '
   ' Display the value of the Subject property.
   WScript.echo "    Subject                  = [" & _
     TypeName(objExchange_MessageTrackingEntry.Subject) & "] " & _
    objExchange_MessageTrackingEntry.Subject
   '
   ' Display the value of the SubjectID property.
   WScript.echo "    SubjectID                = [" & _
     TypeName(objExchange_MessageTrackingEntry.SubjectID) & "] " & _
    objExchange_MessageTrackingEntry.SubjectID
   '
   ' Display the value of the Version property.
   WScript.echo "    Version                  = [" & _
     TypeName(objExchange_MessageTrackingEntry.Version) & "] " & _
    objExchange_MessageTrackingEntry.Version
   '
   ' Display the value of the RecipientCount property.
   WScript.echo "    RecipientCount           = [" & _
     TypeName(objExchange_MessageTrackingEntry.RecipientCount) & "] " & _
    objExchange_MessageTrackingEntry.RecipientCount
   '
   ' Check whether there are any recipients listed.
   if (objExchange_MessageTrackingEntry.RecipientCount > 0) then
     ' If yes, then do the following:
     ' Display a heading.
     WScript.echo "        RecipientAddress : RecipientStatus"
     '
     ' Iterate through the recipient status arrays based on the
     ' number returned by RecipientCount.
     for intRecipientIndex = 0 to objExchange_MessageTrackingEntry.RecipientCount-1
       ' Display the value of the RecipientAddress and RecipientStatus properties.
       WScript.echo "        " & _
         objExchange_MessageTrackingEntry.RecipientAddress(intRecipientIndex) & _
         " : " & _
         objExchange_MessageTrackingEntry.RecipientStatus(intRecipientIndex)
       '
     ' Move to the next recipient.
     next
   else
     ' If no, indicate there no recipients listed.
     WScript.echo "    The RecipientAddress and RecipientStatus arrays were empty."
   end if
   '
   ' Move to the next Exchange_MessageTrackingEntry.
Next
end Sub

VBScript Example

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

'===============================================================
' Name:      ShowExchange_MessageTrackingEntry_AllProperties
' Purpose:   Display each Exchange_MessageTrackingEntry found for the
'            specified Exchange server, and show all
'            properties on the Exchange_MessageTrackingEntry
'            instances.
' Input:     strComputerName [string] the computer to access
' Output:    Displays the KeyID of each Exchange_MessageTrackingEntry and
'            properties
'
'===============================================================
' IMPORTANT: This script may take a very long time to execute when run
'            on a heavily used Exchange server, because the script
'            lists information about all message transfers recorded
'            in the message tracking logs. The GetInstances style
'            of access used in this script causes the WMI provider
'            to enumerate all log entries. To improve the performance
'            of scripts using Exchange_MessageTrackingEntry instances,
'            it is recommended you use WMI ExecQuery, and restrict
'            the results range with the TimeLogged property.
'===============================================================
Public Sub ShowExchange_MessageTrackingEntry_AllProperties ( strComputerName )

Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_MessageTrackingEntry"

Dim strWinMgmts              ' Connection string for WMI
Dim objWMIExchange           ' Exchange Namespace WMI object
Dim listExchange_MessageTrackingEntries ' Exchange_MessageTrackingEntry
                             ' collection
Dim objExchange_MessageTrackingEntry ' A single Exchange_MessageTrackingEntry
                             ' instance
Dim intRecipientIndex        ' A counter for the recipient and recipient
                             ' status arrays

' 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 Exchange_MessageTrackingEntry provider.
strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & _
   strComputerName & "/" & cWMINameSpace
'
' Get an object using the string you just created.
Set objWMIExchange =  GetObject(strWinMgmts)
'
' The instances appear as a list of Exchange_MessageTrackingEntry
' instances in the Exchange namespace.
Set listExchange_MessageTrackingEntries = objWMIExchange.InstancesOf(cWMIInstance)
'
' Iterate through the list of Exchange_MessageTrackingEntry objects.
For each objExchange_MessageTrackingEntry in listExchange_MessageTrackingEntries
   '
   ' Display the value of the KeyID property.
   WScript.echo "KeyID = " & _
    "[" & TypeName(objExchange_MessageTrackingEntry.KeyID) & "] " & _
     objExchange_MessageTrackingEntry.KeyID
   '
   ' Display the value of the TimeLogged property.
   WScript.echo "    TimeLogged               = [" & _
     TypeName(objExchange_MessageTrackingEntry.TimeLogged) & "] " & _
    objExchange_MessageTrackingEntry.TimeLogged
   '
   ' Display the value of the AttemptedPartnerServer property.
   WScript.echo "    AttemptedPartnerServer   = [" & _
     TypeName(objExchange_MessageTrackingEntry.AttemptedPartnerServer) & "] " & _
    objExchange_MessageTrackingEntry.AttemptedPartnerServer
   '
   ' Display the value of the ClientIP property.
   WScript.echo "    ClientIP                 = [" & _
     TypeName(objExchange_MessageTrackingEntry.ClientIP) & "] " & _
    objExchange_MessageTrackingEntry.ClientIP
   '
   ' Display the value of the ClientName property.
   WScript.echo "    ClientName               = [" & _
     TypeName(objExchange_MessageTrackingEntry.ClientName) & "] " & _
    objExchange_MessageTrackingEntry.ClientName
   '
   ' Display the value of the Cost property.
   WScript.echo "    Cost                     = [" & _
     TypeName(objExchange_MessageTrackingEntry.Cost) & "] " & _
    objExchange_MessageTrackingEntry.Cost
   '
   ' Display the value of the DeliveryTime property.
   WScript.echo "    DeliveryTime             = [" & _
     TypeName(objExchange_MessageTrackingEntry.DeliveryTime) & "] " & _
    objExchange_MessageTrackingEntry.DeliveryTime
   '
   ' Display the value of the Encrypted property.
   WScript.echo "    Encrypted                = [" & _
     TypeName(objExchange_MessageTrackingEntry.Encrypted) & "] " & _
    objExchange_MessageTrackingEntry.Encrypted
   '
   ' Display the value of the EntryType property.
   WScript.echo "    EntryType                = [" & _
     TypeName(objExchange_MessageTrackingEntry.EntryType) & "] " & _
    objExchange_MessageTrackingEntry.EntryType
   '
   ' Display the value of the ExpansionDL property.
   WScript.echo "    ExpansionDL              = [" & _
     TypeName(objExchange_MessageTrackingEntry.ExpansionDL) & "] " & _
    objExchange_MessageTrackingEntry.ExpansionDL
   '
   ' Display the value of the LinkedMessageID property.
   WScript.echo "    LinkedMessageID          = [" & _
     TypeName(objExchange_MessageTrackingEntry.LinkedMessageID) & "] " & _
    objExchange_MessageTrackingEntry.LinkedMessageID
   '
   ' Display the value of the MessageID property.
   WScript.echo "    MessageID                = [" & _
     TypeName(objExchange_MessageTrackingEntry.MessageID) & "] " & _
    objExchange_MessageTrackingEntry.MessageID
   '
   ' Display the value of the OriginationTime property.
   WScript.echo "    OriginationTime          = [" & _
     TypeName(objExchange_MessageTrackingEntry.OriginationTime) & "] " & _
    objExchange_MessageTrackingEntry.OriginationTime
   '
   ' Display the value of the PartnerServer property.
   WScript.echo "    PartnerServer            = [" & _
     TypeName(objExchange_MessageTrackingEntry.PartnerServer) & "] " & _
    objExchange_MessageTrackingEntry.PartnerServer
   '
   ' Display the value of the Priority property.
   WScript.echo "    Priority                 = [" & _
     TypeName(objExchange_MessageTrackingEntry.Priority) & "] " & _
    objExchange_MessageTrackingEntry.Priority
   '
   ' Display the value of the SenderAddress property.
   WScript.echo "    SenderAddress            = [" & _
     TypeName(objExchange_MessageTrackingEntry.SenderAddress) & "] " & _
    objExchange_MessageTrackingEntry.SenderAddress
   '
   ' Display the value of the ServerIP property.
   WScript.echo "    ServerIP                 = [" & _
     TypeName(objExchange_MessageTrackingEntry.ServerIP) & "] " & _
    objExchange_MessageTrackingEntry.ServerIP
   '
   ' Display the value of the ServerName property.
   WScript.echo "    ServerName               = [" & _
     TypeName(objExchange_MessageTrackingEntry.ServerName) & "] " & _
    objExchange_MessageTrackingEntry.ServerName
   '
   ' Display the value of the Size property.
   WScript.echo "    Size                     = [" & _
     TypeName(objExchange_MessageTrackingEntry.Size) & "] " & _
    objExchange_MessageTrackingEntry.Size
   '
   ' Display the value of the Subject property.
   WScript.echo "    Subject                  = [" & _
     TypeName(objExchange_MessageTrackingEntry.Subject) & "] " & _
    objExchange_MessageTrackingEntry.Subject
   '
   ' Display the value of the SubjectID property.
   WScript.echo "    SubjectID                = [" & _
     TypeName(objExchange_MessageTrackingEntry.SubjectID) & "] " & _
    objExchange_MessageTrackingEntry.SubjectID
   '
   ' Display the value of the Version property.
   WScript.echo "    Version                  = [" & _
     TypeName(objExchange_MessageTrackingEntry.Version) & "] " & _
    objExchange_MessageTrackingEntry.Version
   '
   ' Display the value of the RecipientCount property.
   WScript.echo "    RecipientCount           = [" & _
     TypeName(objExchange_MessageTrackingEntry.RecipientCount) & "] " & _
    objExchange_MessageTrackingEntry.RecipientCount
   '
   ' Check whether there are any recipients listed.
   if (objExchange_MessageTrackingEntry.RecipientCount > 0) then
     ' If yes, then do the following:
     ' Display a heading.
     WScript.echo "        RecipientAddress : RecipientStatus"
     '
     ' Iterate through the recipient status arrays based on the
     ' number returned by RecipientCount.
     for intRecipientIndex = 0 to objExchange_MessageTrackingEntry.RecipientCount-1
       ' Display the value of the RecipientAddress and RecipientStatus properties.
       WScript.echo "        " & _
         objExchange_MessageTrackingEntry.RecipientAddress(intRecipientIndex) & _
         " : " & _
         objExchange_MessageTrackingEntry.RecipientStatus(intRecipientIndex)
       '
     ' Move to the next recipient.
     next
   else
     ' If no, indicate there no recipients listed.
     WScript.echo "    The RecipientAddress and RecipientStatus arrays were empty."
   end if
   '
   ' Move to the next Exchange_MessageTrackingEntry.
Next
end Sub

Show:
© 2014 Microsoft