Get UCS Service Profile Associations from List of UCSMs
I have to admit I’ve been slack on doing some UCSPowerTool goodness. While this next script isn’t “amazing” it did solve a very time consuming need over the weekend.
The Problem
Let’s say you have multiple UCS clusters. You need to get a breakdown of all of the Service Profile Associations. Well if you have a single UCSM just log into the FI and run:
Show service-profile assoc
This is a piece of cake for a single UCSM but I had nearly 2 dozen that I needed to query with the quickness and all I was provided was a list…figures right? :)
The Solution
In order to solve the problem it’s pretty simple actually.
- Import the list
- Connect to All UCSMs
- Use Get-UcsServiceProfile
- Export Results
Given that I know I’ll need to do this again in the future and wanted to share it with the team I work with I went ahead and added some logic and some user interaction for good measure. I didn’t bother with a full out function but if there’s enough interested I suppose I could. You can find the full script at: