cancel
Showing results for 
Search instead for 
Did you mean: 

MSMQ, Clusteing and PowerShell

Simon_Butler
Level 5
Certified
Hi,

Has anyone suceeded in writing some MSMQ monitoring with PowerShell rather than VBScript?

I've looked at WMI, but EV 8 still uses names which are too long and therefore cut short in WMI queue names (therefore most queues have the same name...and you cannot have any intelligence around thresholds)

I looked at the .net classes for MSMQ, but these don't appear to work on clusters.

Com object - I'm stuck on the init method.

Is there any way to shorten the EV MSMQ queue names?

Any help appreciated.
1 ACCEPTED SOLUTION

Accepted Solutions

AndrewB
Moderator
Moderator
Partner    VIP    Accredited
Simon,

Have a look at this:
http://ijdc.blogspot.com/2010/03/prtg-msmq-and-powershell.html

View solution in original post

4 REPLIES 4

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

hey Simon, what OS are your MSMQs on?

Simon_Butler
Level 5
Certified

2k3Ent x64 Clustered

Thanks,
Si

AndrewB
Moderator
Moderator
Partner    VIP    Accredited
Simon,

Have a look at this:
http://ijdc.blogspot.com/2010/03/prtg-msmq-and-powershell.html

Simon_Butler
Level 5
Certified
Hi AndrewB,

That code snipit will work against a Queue that is not in use - GetAllMessages() actually tries to get a copy of the messages and if EV is running against it the command either will not work or will return 0.

It seems my only options is to revert to using the msmq management DLL - not pretty...

Cheers,
Si