Posts Tagged ‘powershell’

PowerShell: Providers vs Cmdlets

Tuesday, February 12th, 2008

When I wrote the PowerShell snap-in for WebSphere MQ, I chose to implement it as a set of cmdlets.

PS C:\> $myqmgr = Get-WMQQueueManager DALE
PS C:\> Get-WMQQueue -Qmgr $myqmgr

They are new commands for WebSphere MQ – commands that let you get, create, modify new objects representing WebSphere MQ objects.

The commands are consistent with existing commands in syntax and style, to be sure. But, they’re still new commands.

I didn’t have to do it this way.


Thinking out loud: PowerShell support for DB2?

Thursday, January 31st, 2008

My PowerShell library for WebSphere MQ has been out for a month or so now, and it seems to have been well-received. I’ve seen a surprising amount of blog posts and news articles about it, the download stats for the SupportPac are very encouraging, and I’m getting a steady (if slowly growing) stream of emails with requests for help and new features.

There is still more to finish with the WMQ library – the biggest piece of outstanding work is adding support for z/OS queue managers, but there are a few other bits and pieces to do as well.

But even so – with my usual attention span of an easily distracted child, I’m starting to look at what I might try next.

I’m thinking a PowerShell extension for DB2 might be a good next step.


  • Like WebSphere MQ, the prospect of writing it is made much easier by the fact that there is already a .NET API and support for building C# applications for DB2
  • Database administration seems to lend itself quite well to PowerShell’s object-oriented nature. Using Select, Where, et al. still reminds me of SQL pretty much every time I type it
  • I know very little about DB2, and it’d be a chance to learn something new

Okay, so my third reason sounds a little weak, but on a personal level, it’s a consideration.

But would there be a demand for supporting DB2 administration using PowerShell? I don’t know… I’ve not heard anyone ask for it, and other than a post on a developerWorks forum, I haven’t been able to find much of a call for it.

Still, it’s an interesting idea.

Adding remote system admin support to PowerShell (before PowerShell V2)

Thursday, January 17th, 2008

Jeffrey Snover of Microsoft has written a very interesting post on PowerShell cmdlet development, prompted by the release of my latest updates to the WebSphere MQ PowerShell cmdlets.

By way of background, the cmdlets let you administer WebSphere MQ from the Windows PowerShell command prompt and scripting environment. One of WebSphere MQ’s biggest strengths is the breadth of it’s platform support, so it was no surprise that one of the most requested features to be added to the cmdlet library has been to be able to use PowerShell with WebSphere MQ queue managers on non-Windows servers.


Explaining PowerShell for WebSphere MQ

Tuesday, December 11th, 2007

I’ve made a start on a series of posts designed to introduce how to use Windows PowerShell for WebSphere MQ admin. There is a bit of a learning curve for people new to PowerShell, so rather than try to explain everything in one go, I’m planning on breaking it down into bits, covering one topic a day.

If you’re curious to see all this PowerShell stuff I’ve been working on for months, head on over to the WMQ blog:

PowerShell for WebSphere MQ

Tuesday, December 4th, 2007

This has been far too long coming, but finally you can administer WebSphere MQ systems from Windows PowerShell. An extension for WebSphere MQ containing thirty-eight new PowerShell cmdlets is being released as “MO74: WebSphere MQ – Windows PowerShell library“.

I’ll write a more technical blog post that describes what sort of stuff you can do with the SupportPac. That might have to wait till next week – as is unfortunately often the way the WPS day-job is taking up a lot of my time! But in the meantime, I just wanted to write a quick post to say “I finally finished version 1, and got it out the door”! 🙂

Update: Want to see what it can do, but don’t have time to try it out? Download the zip file and take a look at the doc “A cookbook for ‘PowerShell for WebSphere MQ'” (powershellcookbook.pdf) that is in there. I’ve put a bunch of examples of commands there with sample output.

Update 2: I’ve made a start on describing how the PowerShell stuff can be used on the WebSphere MQ blog

Displaying constant names (rather than values) in PowerShell cmdlets

Wednesday, November 21st, 2007

I’ve mentioned before that I’m working on some PowerShell cmdlets for WebSphere MQ. I thought I’d pass on a few tips that I picked up this week on improving the usability of the information displayed by Get- cmdlets in PowerShell.

The easiest way to explain it is to demonstrate with an example: