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

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

上一主题 下一主题
 
只看楼主 倒序阅读 0楼  发表于: 2011-03-10
— 本帖被 YOYO 从 Exchange 脚本中心 移动到本区(2015-06-25) —
  • 脚本环境:Visual Basic
  • 适合版本:Exchange 2003
  • 适用平台:
  • 脚本作用:使用些脚本可以罗列出Exchange中相关的队列信息。
使用些脚本可以罗列出Exchange中相关的队列信息。

On Error Resume Next

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

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

For Each objItem in colItems
    Wscript.Echo "Can enumerate all: " & objItem.CanEnumAll
    Wscript.Echo "Can enumerate failures: " & objItem.CanEnumFailed
    Wscript.Echo "Van enumerate first N messages: " & _
        objItem.CanEnumFirstNMessages
    Wscript.Echo "Can enumerate frozen messages: " & _
        objItem.CanEnumFrozen
    Wscript.Echo "Can enumerate messages not meeting the criteria: " & _
        objItem.CanEnumInvertSense
    Wscript.Echo "Can enumerate messages larger than X: " & _
        objItem.CanEnumLargerThan
    Wscript.Echo "Can enumerate largest N messages: " & _
        objItem.CanEnumNLargestMessages
    Wscript.Echo "Can enumerate oldest N messages: " & _
        objItem.CanEnumNOldestMessages
    Wscript.Echo "Can enumerate messages older than X: " & _
        objItem.CanEnumOlderThan
    Wscript.Echo "Can enumerate recipients: " & _
        objItem.CanEnumRecipient
    Wscript.Echo "Can enumerate senders: " & objItem.CanEnumSender
    Wscript.Echo "Global stop: " & objItem.GlobalStop
    Wscript.Echo "Increasing time: " & objItem.IncreasingTime
    Wscript.Echo "Link name: " & objItem.LinkName
    Wscript.Echo "Message enumeration flags supported: " & _
        objItem.MsgEnumFlagsSupported
    Wscript.Echo "Number of messages: " & objItem.NumberOfMessages
    Wscript.Echo "Protocol name: " & objItem.ProtocolName
    Wscript.Echo "Queue name: " & objItem.QueueName
    Wscript.Echo "Size of queue: " & objItem.SizeOfQueue
    Wscript.Echo "Version: " & objItem.Version
    Wscript.Echo "Virtual machine: " & objItem.VirtualMachine
    Wscript.Echo "Virtual server name: " & objItem.VirtualServerName
    Wscript.Echo
Next
分享到
快速回复
限60 字节
 
上一个 下一个