I'd like to provide a queuepath and get the number of messages thereupon. Any advice on how this could be done?
This will list all queues on a machine and the number of messages:
gwmi -class Win32_PerfRawData_MSMQ_MSMQQueue -computerName $computerName |
ft -prop Name, MessagesInQueue