Exchange_Link Class

Exchange_Link 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_Link WMI class has properties that return information about message-handling links between mail servers. A link can contain zero or more Exchange_Queue objects, depending on the current message traffic along the link. In the Microsoft® Exchange System Manager, these links are called queues.

Namespace

\\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_Link

Provider

The CIM_LogicalElement provider supplies instances of the Exchange_Link class.

Origin

The Exchange_Link 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.

LinkName Property
[key, read] String LinkName;

The LinkName property indicates the name of the link.

ProtocolName Property
[key,
 read] String ProtocolName;

The ProtocolName property indicates the transmission protocol used by the link.

VirtualMachine Property
[key,
 read] String VirtualMachine;

The VirtualMachine property indicates the name of the virtual machine that is the source of the link.

VirtualServerName Property
[key,
 read] String VirtualServerName;

The value of the VirtualServerName property is the integer number of the virtual machine that is the source of the link. This number is the Microsoft Active Directory® common name (CN) for the virtual server object.

ActionFreeze Property
[read] Boolean ActionFreeze;

The ActionFreeze property, when TRUE, specifies that the link supports freezing messages in its queues. The ActionFreeze property corresponds to the sixth bit (0x00000020) of the SupportedLinkActions property.

ActionKick Property
[read] Boolean ActionKick;

The ActionKick property, when TRUE, specifies that the link can trigger its queues to retry transmitting waiting messages immediately, instead of waiting for the default protocol timeout before retrying the transmission. The ActionKick property corresponds to the first bit (0x00000001) of the SupportedLinkActions property.

ActionThaw Property
[read] Boolean ActionThaw;

The ActionThaw property, when TRUE, specifies that the link supports thawing messages in its queues. Thawing a queue is also known as "unfreezing" that queue. The ActionThaw property corresponds to the seventh bit (0x00000040) of the SupportedLinkActions property.

ExtendedStateInfo Property
[read] String ExtendedStateInfo;

The ExtendedStateInfo property provides the text description of the current link status, including extended error reporting and troubleshooting information.

GlobalStop Property
[read] Boolean GlobalStop;

The GlobalStop property indicates whether the virtual server for the link is in disabled mode. If True, the virtual server is disabled.

LinkDN Property
[read] String LinkDN;

The LinkDN property specifies the name of the link.

MessageCount Property
[read] Uint32 MessageCount;

The MessageCount property specifies the number of messages that are waiting for transmission across the link.

NextScheduledConnection Property
[read] DateTime NextScheduledConnection;

The NextScheduledConnection property indicates the next time a connection will be attempted.

OldestMessage Property
[read] DateTime OldestMessage;

The OldestMessage property specifies the date and time that the oldest message that is still waiting to be transmitted was received into the link.

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

The Size property specifies the total size of the messages in the link, in bytes.

StateActive Property
[read] Boolean StateActive;

The StateActive property, when TRUE, specifies that the link is active. The StateActive property corresponds to first bit (0x00000001) of the StateFlags property.

StateFlags Property
[read] Uint32 StateFlags;

The StateFlags property specifies the state of the link. The individual bits of this property are available as the link State… and Type… properties of this class.

StateFrozen Property
[read] Boolean StateFrozen;

The StateFrozen property indicates whether the link is currently frozen. The StateFrozen property corresponds to the sixth bit (0x00000020) of the StateFlags property.

StateReady Property
[read] Boolean StateReady;

The StateReady property, when TRUE, specifies that the link is ready to accept new messages. The StateReady property corresponds to the second bit (0x00000002) of the StateFlags property.

StateRemote Property
[read] Boolean StateRemote;

The StateRemote property, when TRUE, specifies that the destination for messages in this link is on a remote server, instead of the messages being delivered to a local store. The StateRemote property corresponds to the fifth bit (0x00000010) of the StateFlags property.

StateRetry Property
[read] Boolean StateRetry;

The StateRetry property, when TRUE, specifies that the link is retrying a transmission that was unsuccessful. The StateRetry property corresponds to the third bit (0x00000004) of the StateFlags property.

StateScheduled Property
[read] Boolean StateScheduled;

The StateScheduled property, when TRUE, specifies that the link is scheduled for periodic activation, as compared with asynchronous, on-demand activation. The StateScheduled property corresponds to the fourth bit (0x00000008) of the StateFlags property.

SupportedLinkActions Property
[read] Uint32 SupportedLinkActions;

The SupportedLinkActions property specifies the actions supported by the link. The individual bits of this property are available as the Action… properties in this class.

TypeCurrentlyUnreachable Property
[read] Boolean TypeCurrentlyUnreachable;

The TypeCurrentlyUnreachable property, when TRUE, specifies that the link holds messages for destinations that currently cannot be reached. The TypeCurrentlyUnreachable property corresponds to the thirteenth bit (0x00001000) of the StateFlags property.

TypeDeferredDelivery Property
[read] Boolean TypeDeferredDelivery;

The TypeDeferredDelivery property, when TRUE, specifies that the link holds mail that is awaiting a trigger to start transmission. The TypeDeferredDelivery property corresponds to the fourteenth bit (0x00002000) of the StateFlags property.

TypeInternal Property
[read] Boolean TypeInternal;

The TypeInternal property indicates that the link is used for internal message processing. The TypeInternal property corresponds to the fifteenth bit (0x00004000) of the StateFlags property.

TypeLocalDelivery Property
[read] Boolean TypeLocalDelivery;

The TypeLocalDelivery property, when TRUE, specifies that the link handles local mail delivery. The TypeLocalDelivery property corresponds to the tenth bit (0x00000200) of the StateFlags property.

TypePendingCategorization Property
[read] Boolean TypePendingCategorization;

The TypePendingCategorization property, when TRUE, specifies that the link is resolving addresses against entries in Active Directory. The TypePendingCategorization property corresponds to the twelfth bit (0x00000800) of the StateFlags property.

TypePendingRouting Property
[read] Boolean TypePendingRouting;

The TypePendingRouting property, when TRUE, specifies that the link is determining the routing of the next message that is waiting to be transmitted. The TypePendingRouting property corresponds to the eleventh bit (0x00000400) of the StateFlags property.

TypePendingSubmission Property
[read] Boolean TypePendingSubmission;

The TypePendingSubmission property, when TRUE, specifies that the link handles messages that have not yet been submitted to the routing engine. The TypePendingSubmission property corresponds to the sixteenth bit (0x00008000) of the StateFlags property.

TypeRemoteDelivery Property
[read] Boolean TypeRemoteDelivery;

The TypeRemoteDelivery property, when TRUE, specifies that the link is currently handling a remote message delivery. The TypeRemoteDelivery property corresponds to the ninth bit (0x00000100) of the StateFlags property.

Version Property
[read] Uint32 Version;

The Version property specifies the version number of the underlying link control software.

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_Link instances, and how to retrieve the associated properties.

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

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

Dim strWinMgmts		' Connection string for WMI
Dim objWMIExchange	' Exchange Namespace WMI object
Dim listExchange_Links	' ExchangeLogons collection
Dim objExchange_Link		' 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_Link instances in the Exchange namespace.
  Set listExchange_Links = objWMIExchange.InstancesOf(cWMIInstance)
  '
  ' Were any Exchange_Link Instances returned?
  If (listExchange_Links.count > 0) Then
    ' If yes, do the following:
    ' Iterate through the list of Exchange_Link objects.
    For Each objExchange_Link in listExchange_Links
   Wscript.Echo""
   Wscript.Echo""
       '
       ' Display the value of the ActionFreeze property.
       WScript.echo "ActionFreeze             = "& _
        " ["&TypeName(objExchange_Link.ActionFreeze)&"] "& _
       objExchange_Link.ActionFreeze
       '
       '
       ' Display the value of the ActionKick property.
       WScript.echo "ActionKick               = "& _
        " ["&TypeName(objExchange_Link.ActionKick)&"] "& _
       objExchange_Link.ActionKick
       '
       '
       ' Display the value of the ActionThaw property.
       WScript.echo "ActionThaw               = "& _
        " ["&TypeName(objExchange_Link.ActionThaw)&"] "& _
       objExchange_Link.ActionThaw
       '
       '
       ' Display the value of the ExtendedStateInfo property.
       WScript.echo "ExtendedStateInfo        = "& _
        " ["&TypeName(objExchange_Link.ExtendedStateInfo)&"] "& _
       objExchange_Link.ExtendedStateInfo
       '
       '
       ' Display the value of the GlobalStop property.
       WScript.echo "GlobalStop               = "& _
        " ["&TypeName(objExchange_Link.GlobalStop)&"] "& _
       objExchange_Link.GlobalStop
       '
       '
       ' Display the value of the LinkDN property.
       WScript.echo "LinkDN                   = "& _
        " ["&TypeName(objExchange_Link.LinkDN)&"] "& _
       objExchange_Link.LinkDN
       '
       '
       ' Display the value of the LinkId property.
       WScript.echo "LinkID                   = "& _
        " ["&TypeName(objExchange_Link.LinkId)&"] "& _
       objExchange_Link.LinkId
       '
       '
       ' Display the value of the LinkName property.
       WScript.echo "LinkName                 = "& _
        " ["&TypeName(objExchange_Link.LinkName)&"] "& _
       objExchange_Link.LinkName
       '
       '
       ' Display the value of the MessageCount property.
       WScript.echo "MessageCount             = "& _
        " ["&TypeName(objExchange_Link.MessageCount)&"] "& _
       objExchange_Link.MessageCount
       '
       '
       ' Display the value of the NextScheduledConnection property.
       WScript.echo "NextScheduledConnection  = "& _
        " ["&TypeName(objExchange_Link.NextScheduledConnection)&"] "& _
       objExchange_Link.NextScheduledConnection
       '
       '
       ' Display the value of the OldestMessage property.
       WScript.echo "OldestMessage            = "& _
        " ["&TypeName(objExchange_Link.OldestMessage)&"] "& _
       objExchange_Link.OldestMessage
       '
       '
       ' Display the value of the ProtocolName property.
       WScript.echo "ProtocolName             = "& _
        " ["&TypeName(objExchange_Link.ProtocolName)&"] "& _
       objExchange_Link.ProtocolName
       '
       '
       ' Display the value of the Size property.
       WScript.echo "Size                     = "& _
        " ["&TypeName(objExchange_Link.Size)&"] "& _
       objExchange_Link.Size
       '
       '
       ' Display the value of the StateActive property.
       WScript.echo "StateActive              = "& _
        " ["&TypeName(objExchange_Link.StateActive)&"] "& _
       objExchange_Link.StateActive
       '
       '
       ' Display the value of the StateFlags property.
       WScript.echo "StateFlags               = "& _
        " ["&TypeName(objExchange_Link.StateFlags)&"] "& _
       objExchange_Link.StateFlags
       '
       '
       ' Display the value of the StateFrozen property.
       WScript.echo "StateFrozen              = "& _
        " ["&TypeName(objExchange_Link.StateFrozen)&"] "& _
       objExchange_Link.StateFrozen
       '
       '
       ' Display the value of the StateReady property.
       WScript.echo "StateReady               = "& _
        " ["&TypeName(objExchange_Link.StateReady)&"] "& _
       objExchange_Link.StateReady
       '
       '
       ' Display the value of the StateRemote property.
       WScript.echo "StateRemote              = "& _
        " ["&TypeName(objExchange_Link.StateRemote)&"] "& _
       objExchange_Link.StateRemote
       '
       '
       ' Display the value of the StateRetry property.
       WScript.echo "StateRetry               = "& _
        " ["&TypeName(objExchange_Link.StateRetry)&"] "& _
       objExchange_Link.StateRetry
       '
       '
       ' Display the value of the StateScheduled property.
       WScript.echo "StateScheduled           = "& _
        " ["&TypeName(objExchange_Link.StateScheduled)&"] "& _
       objExchange_Link.StateScheduled
       '
       '
       ' Display the value of the SupportedLinkActions property.
       WScript.echo "SupportedLinkActions     = "& _
        " ["&TypeName(objExchange_Link.SupportedLinkActions)&"] "& _
       objExchange_Link.SupportedLinkActions
       '
       '
       ' Display the value of the TypeCurrentlyUnreachable property.
       WScript.echo "TypeCurrentlyUnreachable = "& _
        " ["&TypeName(objExchange_Link.TypeCurrentlyUnreachable)&"] "& _
       objExchange_Link.TypeCurrentlyUnreachable
       '
       '
       ' Display the value of the TypeDeferredDelivery property.
       WScript.echo "TypeDeferredDelivery     = "& _
        " ["&TypeName(objExchange_Link.TypeDeferredDelivery)&"] "& _
       objExchange_Link.TypeDeferredDelivery
       '
       '
       ' Display the value of the TypeInternal property.
       WScript.echo "TypeInternal             = "& _
        " ["&TypeName(objExchange_Link.TypeInternal)&"] "& _
       objExchange_Link.TypeInternal
       '
       '
       ' Display the value of the TypeLocalDelivery property.
       WScript.echo "TypeLocalDelivery        = "& _
        " ["&TypeName(objExchange_Link.TypeLocalDelivery)&"] "& _
       objExchange_Link.TypeLocalDelivery
       '
       '
       ' Display the value of the TypePendingCategorization property.
       WScript.echo "TypePendingCategorization= "& _
        " ["&TypeName(objExchange_Link.TypePendingCategorization)&"] "& _
       objExchange_Link.TypePendingCategorization
       '
       '
       ' Display the value of the TypePendingRouting property.
       WScript.echo "TypePendingRouting       = "& _
        " ["&TypeName(objExchange_Link.TypePendingRouting)&"] "& _
       objExchange_Link.TypePendingRouting
       '
       '
       ' Display the value of the TypePendingSubmission property.
       WScript.echo "TypePendingSubmission    = "& _
        " ["&TypeName(objExchange_Link.TypePendingSubmission)&"] "& _
       objExchange_Link.TypePendingSubmission
       '
       '
       ' Display the value of the TypeRemoteDelivery property.
       WScript.echo "TypeRemoteDelivery       = "& _
        " ["&TypeName(objExchange_Link.TypeRemoteDelivery)&"] "& _
       objExchange_Link.TypeRemoteDelivery
       '
       '
       ' Display the value of the Version property.
       WScript.echo "Version                  = "& _
        " ["&TypeName(objExchange_Link.Version)&"] "& _
       objExchange_Link.Version
       '
       '
       ' Display the value of the VirtualMachine property.
       WScript.echo "VirtualMachine           = "& _
        " ["&TypeName(objExchange_Link.VirtualMachine)&"] "& _
       objExchange_Link.VirtualMachine
       '
       '
       ' Display the value of the VirtualServerName property.
       WScript.echo "VirtualServerName        = "& _
        " ["&TypeName(objExchange_Link.VirtualServerName)&"] "& _
       objExchange_Link.VirtualServerName
       '
    Next
  Else
    ' If no Exchange_Link instances were returned,
    ' display that.
    WScript.Echo "WARNING: No Exchange_Link 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.