Using UCS PowerTool To Generate Tech Supports

Published on January 14, 2016 under Cisco · Tagged Cisco UCS and Powershell · Read in about 1 min (153 words)

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.

#Define Variables
$cred = Get-Credential
$domains = "ucs01.lab.local","ucs02.lab.local"
$fileloc = "C:\Users\david\desktop\logs\"

#Cycles through each UCS creating a tech support for each chassis.
Foreach ($ucs in $domains) {
Connect-UCS $ucs -Credential $cred
$Chassis = Get-UCSChassis
  Foreach ($chassis in $chassis) {
    $id = $
    $filename = "$fileloc$ucs-techsupp-chassis-$id.tar"
    Get-UcsTechSupport -PathPattern $filename -RemoveFromUcs -TimeoutSec 600 -ChassisId $id -CIMC 'all'

Execute the Script

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

See Also