Simple, yet effective.
Especially if you don’t have the MSMQ module for PS.
$queues = Get-WmiObject -computername "YourServer" Win32_PerfFormattedData_msmq_MSMQQueue $queues | ft -AutoSize -property Name,MessagesInQueue
– F
I always forget the correct line for listing these things with WMI.
Therefore, it’s now perpetuated on Fuffle.net. =)
cls $servers = get-content "C:tempserverlist.txt" foreach ($s in $servers){ $gwmi = (Get-WmiObject -ComputerName $s -class win32_operatingsystem -ErrorAction SilentlyContinue).caption write-host "$s - IP:"([System.Net.Dns]::GetHostAddresses($s)) - $gwmi -foregroundcolor “green"}
-F