Achievements

Advertisements

PoSh – HP Scripting Tools for Windows PowerShell

After taking a while to figure out where to download it (HP Download Link), the rest was easy. Once downloaded, just unzip the file wherever you like (note: it isn’t unzipping into an install directory) and then run the included executable. Now open up a PowerShell session and you’re good to go…

First thing I did, try and figure out what commands are now available by doing the following command to be greeted by 112 new cmdlets:

Get-Command *HP*

Lots of cool stuff in there that should make life a whole lot easier. I started off by checking out and testing the things I would use most often, like host power info, boot order, UID light changes, etc.

First up, let’s get comfortable with how it works by finding some HP iLO systems:

Find-HPiLO

Couple things to note: this is by IP address only, there’s no DNS resolution; IP ranges work, but require patience.

Now that I’ve established that I can find the iLOs and I can find them from versions 2, 3, and 4, let’s do something cool like turn a hosts’ power on. Start off by establishing a host to test with by the find-hpilo command and storing it into a variable to save typing the IP every time. For my convenience, I also stored the username and password into separate variables as there’s no Credential parameter. I check the current status, which I was verifying by connection via web browser to the iLO, I run the following command:

Next up, turning the UID light off and on. This is especially helpful to locate servers while in the datacenter. The UID follows the same, semi-awkward use of “Yes” and “No” as the HostPower cmdlet does.
Get UID status:

Review time: It’s a solid start by HP to get into realm of PowerShell administration of their servers. The big pieces are there and functional and I plan to add this tool into my arsenal immediately. With that said, there are some oddities, such as yes/no answers instead of on/off and gathering the event logs into an array instead of a table format. There’s some other stuff that I’m sure will come as the product starts to evolve, hopefully items like piping a find-hpilo into a get-hpilo cmdlet and adding in a credential parameter instead of forcing a username/password with each use of the cmdlet. Overall, if you have HP servers in your environment and use PowerShell at all, this is definitely something you should be checking out.

A few updates for you.
In the current version (as of this post V1.2) Credential parameters can be used as well as username and password. There are currently 117 cmdlets.
The download link does work, there was a week or 2 during a transition to new web pages where it did not work. http://www.hp.com/go/PowerShell
We also now have cmdlets for the Onboard Administrator for C3000 and C7000 blade enclosures.
Other PowerShell support is in development.