Cisco releases dozens of free PowerShell scripts to manage its UCS servers

Cisco recently launched a beta PowerShell toolkit to automate common server management tasks. Here's the lowdown.

On June 1, 2011, Cisco released the beta version of the Unified Computing System Manager PowerShell Toolkit with dozens of cmdlets to help automate management tasks on Cisco's UCS bladeserver. Interesting! I contacted one of the project’s leaders, John McDonough, custom application engineer, and asked him to tell me more about it. What follows is a guest blog written by John, but before we get to that, I had a few questions for him.

Why PowerShell? What is it about Microsoft’s scripting language that you thought would be great for UCSM?

We felt that Microsoft really hit the mark with PowerShell, making it object oriented and XML aware, and a host of  other significant features, really made it a perfect fit for UCSM.

Are the PowerShell cmdlets useful enough for UCS management even for shops that don’t really do much .Net?

No .Net needed here, if you can run a command, provide some arguments, sometimes make some XML for the more intricate tasks, and press enter, you’re good to go.

If an enterprise IT person downloads the cmdlets, uses them, modifies them and wants to share feedback, how would s/he do that?submit feedback on what they’d like to see, what works well, what doesn’t, and share their solutions, tips and trials in the forums.  We monitor the forums daily and want to provide the most usable tools possible.

Users of the library are welcomed and encouraged to

With that in mind, here is what John has to say about the toolkit ...

The beta version of the UCSM toolkit provides cmdlets for the most utilized functions of the UCSM. The UCSM Toolkit uses standard verbs, supports the integrated Get-Help system, and supports common PowerShell practices such as object-based output, Cmdlet pipelining, and the PowerShell Common Parameters.

Built using Microsoft’s .NET technology, the UCSM PowerShell toolkit uses the UCSM XML API for all communication between the toolkit and the UCSM instance.  The toolkit generates the appropriate XML document for the API call, and then sends the XML to the Web Service resident on the UCSM instance.  Authentication is handled using the built-in AAA functions of UCSM, and session management is handled by the PowerShell toolkit for a persistent connection experience. The UCSM PowerShell toolkit is delivered as a PowerShell module.

The Cmdlets can be categorized into four groups.

  • Add – Creates new UCSM objects
  • Get – Retrieves information about existing UCSM objects
  • Remove – deletes existing UCSM objects
  • Set – Modifies existing attributes of UCSM objects
  • Miscellaneous – Provides for session management, chassis and server management, direct XML entry and other UCSM function not fitting into the first four categories.

The installation, utilization and removal of the UCSM toolkit is very simple. The toolkit can be downloaded from the Cisco Developer Network Unified Computing Section,, follow the link for “PowerShell Library”. Once download extract the zip file contents and import the UCSM PowerShell module (CiscoUCSPS.dll) into the current PowerShell session, using the Import-Module Cmdlet. The zip archive contains three files.

  • CiscoUCSM.dll
  • CiscoUCSPS.dll
  • CicsoUCSPS.dll-Help.xml

These three files need to be available to any PowerShell scripts utilizing the UCSM toolkit.

To verify successful import of the CicsoUCSPS.dll module, display the currently loaded modules using the Get-Module cmdlet. To list the commands available in the CiscoUCSPS module run the Get-Command cmdlet specifying the UCSM module

  • Get-Command –Module CicsoUCSPS

The Add Cmlets allow for the creation of UCSM

  • Organizations
  • Schedules
  • Server Pools
  • Service Profiles
  • Service Profile Templates
  • Service Profiles from Templates
  • UUID Pools
  • Virtual HBAs
  • Virtual HBA Templates
  • Vlans
  • Virtual Network Interfaces
  • Vsans

The Get Cmdlets allow for the retrieval of these UCSM objects

  • Adapter Policy
  • Audit Logs
  • BIOS Policy
  • Blade Information
  • Chassis Information
  • Current UCS PS Session
  • Fabric Port Information
  • Faults
  • IPMI Policy
  • Locator LED status
  • Organization Information
  • Power Policy
  • Rack Server Information
  • Schedule Information
  • Server Pools
  • Service Profiles
  • Service Profile Template
  • UCS Events
  • UCS User Sessions
  • UUID Pools
  • Virtual HBAs
  • Virtual HBA Templates
  • Vlans
  • Virtual Network Interfaces
  • Virtual Network Interface Connection Policy
  • Vsans

The Set Cmdlets allow for the modification of attributes of these UCSM objects

  • Service Profile BIOS Policy
  • Service Profile Blade Power
  • Service Profile Rack Mount Power
  • Service Profile IPMI Policy
  • Service Profile Power Policy
  • Service Profile Server Pool
  • Service Profile User Label
  • Service Profile Description
  • Service Profile Threshold Policy
  • Service Profile Virtual HBA
  • Service Profile Virtual HBA Template
  • Service Profile Virtual Network Interface
  • Service Profile Virtual Network Interface Connection Policy
  • Fabric Port properties
  • Blade and Rack Mount server Locator LED mode

The Remove Cmdlets allow for the deletion of these UCSM objects

  • Blade
  • Chassis
  • Organization
  • Schedule
  • Server Pool
  • Service Profile
  • Service Profile Template
  • UCSM User Session
  • UUID Pool
  • Virtual HBA
  • Virtual HBA Template
  • Vlan
  • Virtual Network Interface
  • Vsan

The Miscellaneous Cmdlets manage the PowerShell toolkit sessions as well as provide for the management of UCS chassis and blades. Finally to round out the current Beta UCSM PowerShell Toolkit is the UCSM Invoke-XmlCommand Cmdlet. The Invoke-XmlCommand Cmtlet allows for the processing of any valid UCS XML document, so where the UCSM toolkit may not yet have the cmdlet that you require the Invoke-XmlCommand can fill that void.

The UCSM PowerShell toolkit is intended to be developer community driven; the initial Cmdlets provided were determined to be the most needed based on customer feedback. The future of the toolkit can be determined by you.  Download it, try it out, let us know what you think.

John McDonough

custom application engineer

More from the Cisco Odd and Ends blog

A Cisco engineer says changes at Cisco are good

The Adventures of Varman (how Cisco engineers save the day)

Cisco sued over its alleged part in Great Chinese Firewall scandal

Rumors fly about massive Cisco layoffs

The eight most important commands on a Cisco ASA security appliance

Follow all Cisco Subnet bloggers on Twitter @ciscosubnet

Follow Julie Bort on Twitter @Julie188

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2011 IDG Communications, Inc.

SD-WAN buyers guide: Key questions to ask vendors (and yourself)