切换到宽版
  • 5120阅读
  • 0回复

[求助]使用脚本列出Exchange连接信息 [复制链接]

上一主题 下一主题
 
只看楼主 倒序阅读 0楼  发表于: 2011-03-13
— 本帖被 YOYO 从 Exchange 脚本中心 移动到本区(2015-06-25) —
  • 脚本环境:Visual Basic
  • 适合版本:Exchange 2003
  • 适用平台:
  • 脚本作用:列出Exchange连接信息
使用此脚本可以在运行Exchange 2003的电脑中列出所有的Exchange的连接信息。


On Error Resume Next


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & _
        "\ROOT\MicrosoftExchangeV2")


Set colItems = objWMIService.ExecQuery _
    ("Select * from Exchange_Link")


For Each objItem in colItems
    Wscript.Echo "Action freeze: " & objItem.ActionFreeze
    Wscript.Echo "Action kick: " & objItem.ActionKick
    Wscript.Echo "Action thaw: " & objItem.ActionThaw
    Wscript.Echo "Extended state info: " & _
        objItem.ExtendedStateInfo
    Wscript.Echo "Global stop: " & objItem.GlobalStop
    Wscript.Echo "Link distinguished name: " & objItem.LinkDN
    Wscript.Echo "Link ID: " & objItem.LinkID
    Wscript.Echo "Link name: " & objItem.LinkName
    Wscript.Echo "Message count: " & objItem.MessageCount
    Wscript.Echo "Next scheduled connection: " & _
        objItem.NextScheduledConnection
    Wscript.Echo "Oldest message: " & objItem.OldestMessage
    Wscript.Echo "Protocol name: " & objItem.ProtocolName
    Wscript.Echo "Size: " & objItem.Size
    Wscript.Echo "State action: " & objItem.StateActive
    Wscript.Echo "State flags: " & objItem.StateFlags
    Wscript.Echo "State frozen: " & objItem.StateFrozen
    Wscript.Echo "State ready: " & objItem.StateReady
    Wscript.Echo "State remote: " & objItem.StateRemote
    Wscript.Echo "State retry: " & objItem.StateRetry
    Wscript.Echo "State scheduled: " & objItem.StateScheduled
    Wscript.Echo "Support link actions: " & _
        objItem.SupportLinkActions
    Wscript.Echo "Type currently unreachable: " & _
        objItem.TypeCurrentlyUnreachable
    Wscript.Echo "Type deferred deilvery: " & _
        objItem.TypeDeferredDelivery
    Wscript.Echo "Type internal: " & objItem.TypeInternal
    Wscript.Echo "Type local delivery: " & _
        objItem.TypeLocalDelivery
    Wscript.Echo "Type pending categorization: " & _
        objItem.TypePendingCategorization
    Wscript.Echo "Type pending routing: " & _
        objItem.TypePendingRouting
    Wscript.Echo "Type pending submission: " & _
        objItem.TypePendingSubmission
    Wscript.Echo "Type remote delivery: " & _
        objItem.TypeRemoteDelivery
    Wscript.Echo "Version: " & objItem.Version
    Wscript.Echo "Virtual machine: " & objItem.VirtualMachine
    Wscript.Echo "Virtual server name: " & _
        objItem.VirtualServerName
    Wscript.Echo
Next



分享到
快速回复
限60 字节
 
上一个 下一个