This issue has been solved.

Powershell : Retrieving the message count for MSMQ queues

Created: 08 Dec 2012 | Updated: 18 Jan 2013
Login to vote
0 0 Votes

Hello,

Do you have a script to monitor all MSMQ queues on Vault?

I found some on Internet but they don't work as the queue names get truncated to 64 characters.

Thanks!

Quick Look Solution

We use the attached

We use the attached Powershell.

The file srvlist.txt (which is called in the PS1 file) is filled with the aliasses of the EV-servers, 1 per line.

This list reports if an EV-queue is over 100 messages.

Rename file to .ps1, test

 

Filed Under

Comments

JesusWept3
Trusted Advisor
08
Dec
2012
Votes
0

Does it have to be

Does it have to be powershell??

JesusWept3
Trusted Advisor
08
Dec
2012
Votes
0

Wayne Humphrey wrote a nice

Wayne Humphrey wrote a nice little VBScript you can find here:
http://www.symantec.com/connect/blogs/monitoring-msmq-vbs

Rob.Wilcox
Trusted Advisor
09
Dec
2012
Votes
0

Did you look at the

Did you look at the PowerShell Community Extensions:

 

http://pscx.codeplex.com/releases/view/96847

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.

09
Dec
2012
Votes
0

No, it does not have to be

No, it does not have to be necessary Powershell, it can be other language.

I will check this vbs and if it works I will mark as the solution.

Thanks again, great forum full of experts!

09
Dec
2012
Votes
0

I just tried the script but

I just tried the script but it returns 0 messages (although when I check in compmgmt.msc there are about 100 messages).

 

AKL
Certified
Certified
09
Dec
2012
Votes
0

I've a script which monitors

I've a script which monitors EV other MSMQ and generates HTML email alerts based on parameters definied within script.

At the core, it uses WMI query to pull MSMQ information for multiple servers.

I can upload it to download section but might take couple days as it goes through approvals.

If you wish, I can email it to you and you can test if it works for you

Thank You

AKL

09
Dec
2012
Votes
0

Thanks for reply, yes it

Thanks for reply, yes it could be great if you can send me by email so I can test.

AndrewB
Partner
Accredited
09
Dec
2012
Votes
+1

here's how you can use the

here's how you can use the WMI called from powershell. works like a charm. just put this in a file whatever.ps1 and you're off to the races. you can substitute the ft for fl or however you'd like the results to be listed.

$queues = Get-WmiObject Win32_PerfFormattedData_msmq_MSMQQueue
$queues | ft -property Name,MessagesInQueue

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner | www.trace3.com

GertjanA
Partner
Accredited
Certified
10
Dec
2012
Votes
+1
SOLUTION

We use the attached

We use the attached Powershell.

The file srvlist.txt (which is called in the PS1 file) is filled with the aliasses of the EV-servers, 1 per line.

This list reports if an EV-queue is over 100 messages.

Rename file to .ps1, test

 

AttachmentSize
CheckPrivateQueues.ps1_.txt 1.24 KB

Thank you, Gertjan, MCSE, MCITP,MCTS, SCS, STS
Company: www.t2.nl

www.quadrotech-it.com

www.symantec.com/vision

Rob.Wilcox
Trusted Advisor
10
Dec
2012
Votes
0

You might want to have a look

You might want to have a look at MSMQ Monitor :

 

http://www.quadrotech-it.com/products/evtools/msmq-monitor/

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.

10
Dec
2012
Votes
0

I just tested this tool on my

I just tested this tool on my EV server (clustered) : 

PS C:\msmq> .\MSMQMonitor.exe

 

QUADROtech MSMQ monitoring (http://www.quadrotech-it.com)
 
 
Unhandled Exception: System.Messaging.MessageQueueException: Remote computer is
not available.
   at System.Messaging.MessageQueue.GetPrivateQueuesByMachine(String machineName
)
   at QUADROtech.MSMQMonitor.MSMQ.MessageQueueInit.LoadWrappers(String machineNa
me, MonitorFilterDefinition filterDefinition)
   at QUADROtech.MSMQMonitor.Program.Main(String[] args)
PS C:\msmq>
Rob.Wilcox
Trusted Advisor
10
Dec
2012
Votes
0

I've never tried it on a

I've never tried it on a clustered environment.  Did you try any of the command line switches from the instructions on the QUADROtech web site?

 

(Feel free to email direct to troubleshoot -> rob.wilcox@quadrotech-it.com)

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.

10
Dec
2012
Votes
0

I sent you an email with more

I sent you an email with more info, thanks in advance.

Rob.Wilcox
Trusted Advisor
10
Dec
2012
Votes
0

NP - I think we got to the

NP - I think we got to the bottom of (part of) it on email .. MSMQ Monitor currently doesn't support clustered servers.

 

As mentioned over email, I'll dig out some other code and send it over.

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.