Automated Firmware Bundle Staging - PowerShell script

Version 3

    This PowerShell/PowerTool script is a subset of Eric Williams' "UCS Firmware Upgrade with UCS PowerTool".


    This is an very useful script to automate the tedious tasks of logging into CCO, navigating to the UCS Firmware bundles, downloading the bundles to a local directory, and then uploading to a UCS Domain.

    NOTE: This script does not start the Firmware Upgrade Process - it simply automates getting Firmware Bundles to the FIs.


    When the script is first executed, the user is prompted for the three pieces of info:
    - version:   The Firmware version the user would like to upload to a UCS Domain ex: 2.2(1b)
    - ucs:   The UCSM IP address of the target UCS Domain
    - imageDir:   This is a working directory where the bundles will be downloaded to, and uploaded from


    Once the three inputs are entered, the PowerTool script will first look to see if the bundles are already in the working directory.  If the bundles are *NOT* located in the working directory (via pattern match against the version entered), the user will be prompted for their CCO credentials.  After CCO authentication, The A/B/C firmware bundles for the specified version will be downloaded to the working directory, and once downloaded, the user will be prompted for the UCSM credentials of the target UCS Domain.  Once authenticated to the UCS Domain, the bundles will then be uploaded to the UCS Domain.


    Once of my favorite features:  if the bundles *ARE* found in the working directory, the CCO piece is skipped and the user is prompted for UCSM credentials, once authenticated, all firmware bundles that match the specified version will be uploaded to the UCS Domain.
    - this is great of you are working in a DMZ with no access to CCO, or perhaps have a respository of Firmware bundles already.

    As an added bonus, here is a PowerTool one-liner that I often use to upload an entire directory of Firmware Bundles in one command:

    [IO.Directory]::GetFiles("C:\SHARE\2.2.1b") | foreach {Send-ucsFirmware -LiteralPath $_}

    In the above example, all bundles contained in the C:\SHARE\2.2.1b directory will be uploaded to the FIs.

    Hope this helps,