PowerShell Script for VMware Cloud Foundation Bundle Management
search cancel

PowerShell Script for VMware Cloud Foundation Bundle Management

book

Article ID: 313523

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

This article provides a menu-driven PowerShell script for VMware Cloud Foundation bundle management. The script can be used as-is or as an example in order to automate bundle management operations. 


Symptoms:

Bundle management in SDDC Manager requires gathering information and running tasks and collecting information from several different places. The attached PowerShell script provides an administrator the ability to perform bundle management operations in SDDC Manager using PowerShell.

  • SDDC Manager is unable to download bundles due to insufficient free disk space.
  • Get the IDs, applicable VMware Cloud Foundation Version, Product, and Type for downloaded bundles.
  • Get the IDs, applicable VMware Cloud Foundation Version, Product, and Type for available bundles.
  • Schedule bundle(s) download.
  • Show SDDC Manager disk space usage for bundle downloads.
  • Delete bundles from the SDDC Manager inventory based on the bundle ID, VMware Cloud Foundation version, or all bundles that are not required for the environment.


Environment

VMware Cloud Foundation 4.4.x
VMware Cloud Foundation 4.5.x
VMware Cloud Foundation 5.0.x
VMware Cloud Foundation 5.1.x
VMware Cloud Foundation 5.2.0

Resolution

  1. Prepare System Requirements:
    • Windows, Linux, or MacOS running PowerShell Core 7.3.0 or later.
    • VMware PowerCLI 13.1 or later
    • PowerVCF 2.3.0 or later
  2. Download attached script.
  3. Extract script, change to its directory.
  4. Run script 
    • with parameters:
      • .\VcfBundleManagement.ps1 -user <SDDC_Manager_user> -server <SDDC_Manager_FQDN> -pass <password> -rootPass <root_password>
      • Where: 
        • <SDDC_Manager_user>      is the username to authenticate with SDDC Manager.
        • <password>                          is the password to authenticate with SDDC Manager
        • <SDDC_Manafer_FQDN>    is the fully qualified domain name of the SDDC Manager
        • <root_password>                  is the password for the root user on the SDDC Manager appliance
    • without parameters (script will ask for input parameters):
      • .\VcfBundleManagement.ps1
  5. Select options from the displayed menu and press enter to run it.

Note: Delete bundles operations will show selected bundles and ask for confirmation before running the delete workflow.

Example Menu:

image.png

 


Attachments

VcfBundleManagement-v1.0.6.zip get_app