David Stamen bio photo

David Stamen

Senior Virtualization Engineer

VCAP-DCA | MCSA | VMware vExpert | Cisco Champion | PernixPro

Email Twitter LinkedIn Github

Im finally getting to dive back in to working with UCS. My latest task with my project of configuring 9 UCS Domains, was configuring the Policy Backup and Export. See below on how to automate this process!

Pre-Requsites

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
$UCS = "FQDNofUCS" #FQDN of UCS To COnnect To
$Hostname = "ucs.lab.local" #Hostname to Upload backup to.
$Protocol = "scp" #Transfer Protocol. ftp,scp,tftp,sftp
$User = "ftpuser" #Username
$Password = "ftpuser" #Password
$MgmtBackupRemoteFile = "Full" #Location/Prefix of File. Location/Prefix will be in front of filename
$ConfigBackupRemoteFile = "AllConfig" #Location/Prefix of File. Location/Prefix will be in front of filename
$AdminState = "enable" #enable or disable
$Schedule = "1day" #1day, 7day, 14day for daily, weekly or biweekly backups

Execute the Script

  • Run .\Set-UCSPolicyBackupandExport.ps1
  • Logon and UCSM, Navigate to Admin/All and Then select the Policy Backup & Export.
    • Verify Settings.

Hope this helps anyone else out wanted to automate policy backup & export on Cisco UCS.