Saturday, June 14, 2008

MSMQ, the PowerShell way…

MSMQ from the plumber's mate - MSMQ and Powershell #1

“Powershell is looking to be a really great scripting language and ideal for filling the void of scripts available for manipulating MSMQ.

Over the next few weeks I plan to generate some simple scripts that will perform some of the basic, and not so basic, administrative and troubleshooting tasks you need to do from time to time. There are no cmdlets written for MSMQ just yet so we will be calling into COM and System.Messaging.

Powershell reference links:

Today's sample will be look at the active queues on a machine.
Note - "Active" means any queue containing messages or being held open by an application.

…”

I’ve been using MSMQ for years and am pretty darn happy with it.

It’s nice to it get some PowerShell attention…

2 comments:

  1. Hi Greg, hopefully I'll be able to put together some useful samples for people to use over time.
    Do you have any suggestions for admin tasks in MSMQ that would benefit from scripting?
    Cheers
    John

    ReplyDelete
  2. First of all, thanks for the comment, for taking the time to original post and for the quest for feedback...

    The first MSMQ admin throughts that come to mind are;

    a) Exists - Does a queue exist or not
    b) Message Count
    c) Clearing a queue

    We use Private queues, and besides the known Create/Delete/Set/Get issues (which have to be done on the machine on which the private queues are) I've used the COM API to do the above things (well except clearing...). I think having these three things available via PowerShell would be pretty cool...

    If I were using Public Queues (it's a long story) then I'd probably want Create/Delete/Get/Set as well.... :)

    Hope this helps and thank you again John.

    ReplyDelete

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...