Returns queue information for 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 ExchangeQueue")For Each objItem in colItemsWscript.Echo "Can enumerate all: " & objItem.CanEnumAllWscript.Echo "Can enumerate failures: " & objItem.CanEnumFailedWscript.Echo "Van enumerate first N messages: " & _objItem.CanEnumFirstNMessagesWscript.Echo "Can enumerate frozen messages: " & _objItem.CanEnumFrozenWscript.Echo "Can enumerate messages not meeting the criteria: " & _objItem.CanEnumInvertSenseWscript.Echo "Can enumerate messages larger than X: " & _objItem.CanEnumLargerThanWscript.Echo "Can enumerate largest N messages: " & _objItem.CanEnumNLargestMessagesWscript.Echo "Can enumerate oldest N messages: " & _objItem.CanEnumNOldestMessagesWscript.Echo "Can enumerate messages older than X: " & _objItem.CanEnumOlderThanWscript.Echo "Can enumerate recipients: " & _objItem.CanEnumRecipientWscript.Echo "Can enumerate senders: " & objItem.CanEnumSenderWscript.Echo "Global stop: " & objItem.GlobalStopWscript.Echo "Increasing time: " & objItem.IncreasingTimeWscript.Echo "Link name: " & objItem.LinkNameWscript.Echo "Message enumeration flags supported: " & _objItem.MsgEnumFlagsSupportedWscript.Echo "Number of messages: " & objItem.NumberOfMessagesWscript.Echo "Protocol name: " & objItem.ProtocolNameWscript.Echo "Queue name: " & objItem.QueueNameWscript.Echo "Size of queue: " & objItem.SizeOfQueueWscript.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