Returns information about Exchange links on a computer running Microsoft Exchange Server 2003
On Error Resume NextstrComputer = "."Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & _"\ROOT\MicrosoftExchangeV2")Set colItems = objWMIService.ExecQuery _("Select * from Exchange_Link")For Each objItem in colItemsWscript.Echo "Action freeze: " & objItem.ActionFreezeWscript.Echo "Action kick: " & objItem.ActionKickWscript.Echo "Action thaw: " & objItem.ActionThawWscript.Echo "Extended state info: " & _objItem.ExtendedStateInfoWscript.Echo "Global stop: " & objItem.GlobalStopWscript.Echo "Link distinguished name: " & objItem.LinkDNWscript.Echo "Link ID: " & objItem.LinkIDWscript.Echo "Link name: " & objItem.LinkNameWscript.Echo "Message count: " & objItem.MessageCountWscript.Echo "Next scheduled connection: " & _objItem.NextScheduledConnectionWscript.Echo "Oldest message: " & objItem.OldestMessageWscript.Echo "Protocol name: " & objItem.ProtocolNameWscript.Echo "Size: " & objItem.SizeWscript.Echo "State action: " & objItem.StateActiveWscript.Echo "State flags: " & objItem.StateFlagsWscript.Echo "State frozen: " & objItem.StateFrozenWscript.Echo "State ready: " & objItem.StateReadyWscript.Echo "State remote: " & objItem.StateRemoteWscript.Echo "State retry: " & objItem.StateRetryWscript.Echo "State scheduled: " & objItem.StateScheduledWscript.Echo "Support link actions: " & _objItem.SupportLinkActionsWscript.Echo "Type currently unreachable: " & _objItem.TypeCurrentlyUnreachableWscript.Echo "Type deferred deilvery: " & _objItem.TypeDeferredDeliveryWscript.Echo "Type internal: " & objItem.TypeInternalWscript.Echo "Type local delivery: " & _objItem.TypeLocalDeliveryWscript.Echo "Type pending categorization: " & _objItem.TypePendingCategorizationWscript.Echo "Type pending routing: " & _objItem.TypePendingRoutingWscript.Echo "Type pending submission: " & _objItem.TypePendingSubmissionWscript.Echo "Type remote delivery: " & _objItem.TypeRemoteDeliveryWscript.Echo "Version: " & objItem.VersionWscript.Echo "Virtual machine: " & objItem.VirtualMachineWscript.Echo "Virtual server name: " & _objItem.VirtualServerNameWscript.EchoNext
This is a VB Script, this can be used by saving the file in .vbs file