Getting started with Cisco UCS PowerTool
Today I was lucky enough to grab some time with Eric Williams and colleagues over at Cisco, they held a one day training course on their UCS PowerTool which is a PowerShell module for managing UCS Systems, if you haven’t seen the Cisco UCS systems I suggest you get out from under that rock and check them out, they are fantastic implementation of a PowerShell module, currently they are available as a beta under the Cisco Developer network here.
Eric and the PowerTool Developers have done a fantastic job on PowerTool, at the moment they have 1498 cmdlets, I wont list them all here as that would be a post unto itself. A huge amount of cmdlets and that means a huge amount of coverage, they have around 99.1% coverage.
There were many areas in this module that impressed me, most of all was the fact that only 35 of these cmdlets were written manually, the other cmdlets were generated automatically using the UCS Manager XML API and the schema, and I’m not talking about cmdlets which are just basic cmdlets either, these are fully pipeline enabled cmdlets !
In this post I will just mention one of their features which impressed me but I have a list of more to add so make sure you keep an eye out for further posts on this.
The Module comes with a getting started guide which can be found here, this is well worth a read and is full of examples. At the time of writing this these are the only examples available as the cmdlets do not yet have help so the normal Get-Help cmdletname –Examples will not work.
How do you navigate 1498 cmdlets ?
One of the first things I wondered when I saw they had so many cmdlets was how do you find the one you need, obviously PowerShell has built in methods for this like using Get-Command with wildcards etc but with 1498 cmdlets this would only get you so far.
I was then shown Get-UCSCmdletMeta, this cmdlet is a fantastic way of finding not only cmdlets but also what cmdlets are used in conjunction with that cmdlet and also other cmdlets which you are likely to need, lets start with an example, say I wanted to get the VLANs I had setup in Cisco UCS, I would use the cmdlet as follows:
As you can see it shows the verbs we can use with this and also the Noun so we know instantly what cmdlets are available for use with VLAN’s, it doesn’t end their either, it also gives us a PipelineClassId, these are basically the type of classes which can be piped into this cmdlet, that’s pretty cool.. but wait…
The even cooler thing about this is we can also see the cmdlets which this cmdlet can pipe into, to do this we can add a –tree parameter like so:
Its great to see people putting thought into how to make things easier for users to use their cmdlets, this is a great way of showing the cmdlets and helping find your way around.