Export (0) Print
Expand All

EntryType Property

Exchange Server 2003

EntryType Property

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 EntryType property indicates what occurred to cause the message tracking log entry to be created. The EntryType property is read-only.

Applies To

The EntryType property is a member of the Exchange_MessageTrackingEntry Class.

Instance Path

The EntryType property appears on instances of the \\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_MessageTrackingEntry class.

MOF Syntax

[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;

Qualifiers

This property has no qualifiers.

Property Values Map

The following table lists the EntryType allowed values.

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

Selecting Instances Using VBScript

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

'===============================================================
' Name:      ShowExchange_MessageTrackingEntry_Query_EntryType
' Purpose:   Display each Exchange_MessageTrackingEntry found for the
'            specified Exchange server, and show the EntryType
'            property for each Exchange_MessageTrackingEntry
'            instance. Only log entries created within the
'            number of hours specified are displayed.
' 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 and EntryType properties
'            for each Exchange_MessageTrackingEntry created
'            within the specified time.
'
'===============================================================
' 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_EntryType ( _
  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, and that the SELECT clause
' requests only the KeyID and EntryType properties.
strWQLQuery = "SELECT KeyID, EntryType " & _
    "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 message tracking log entries 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 EntryType property.
   WScript.echo "    EntryType = [" & _
     TypeName(objExchange_MessageTrackingEntry.EntryType) & "] " & _
    objExchange_MessageTrackingEntry.EntryType
   '
   '
   ' 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 EntryType property.

'===============================================================
' Name:      ShowExchange_MessageTrackingEntry_EntryType
' Purpose:   Display each Exchange_MessageTrackingEntry found for the
'            specified Exchange server, and show the EntryType
'            property for each Exchange_MessageTrackingEntry
'            instance.
' Input:     strComputerName [string] the computer to access
' Output:    Displays the KeyID of each Exchange_MessageTrackingEntry and
'            the EntryType 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_EntryType ( 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

' 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 EntryType property.
   WScript.echo "    EntryType = [" & _
     TypeName(objExchange_MessageTrackingEntry.EntryType) & "] " & _
    objExchange_MessageTrackingEntry.EntryType
   '
   ' Move to the next Exchange_MessageTrackingEntry.
Next
end Sub

Show:
© 2015 Microsoft