Using UCS PowerTool To Generate Tech Supports

Share on:

Automation, Automation, Automation! I had to download some support bundles for every chassis in our multiple zones. Instead of manually going through the GUI, I figured why not script it! This script will connect to each UCS domain and automatically generate a support bundle and download it for each chassis.


Preparing to Execute the Script

The script is pretty straight forward, just need to define a few variables seen below and then you execute the script. I will walk you through the process.

 1#Define Variables
 2$cred = Get-Credential
 3$domains = "ucs01.lab.local","ucs02.lab.local"
 4$fileloc = "C:\Users\david\desktop\logs\"
 6#Cycles through each UCS creating a tech support for each chassis.
 7Foreach ($ucs in $domains) {
 8Connect-UCS $ucs -Credential $cred
 9$Chassis = Get-UCSChassis
10  Foreach ($chassis in $chassis) {
11    $id = $
12    $filename = "$fileloc$ucs-techsupp-chassis-$id.tar"
13    Get-UcsTechSupport -PathPattern $filename -RemoveFromUcs -TimeoutSec 600 -ChassisId $id -CIMC 'all'
14  }

Execute the Script

  • Run .\Create-UCSTechSupport.ps1
comments powered by Disqus

See Also