Detecting and Removing Invalid vApp Templates

In the event that a vApp Template or Catalog Item fails during the upload process parts of that vApp Template can be left behind. To find and remove those items run the following:

$badvappt = Search-Cloud -QueryType AdminVappTemplate | Where-Object { $.Status -eq "FAILEDCreation" }

foreach ( $id in $badvappt ) {

Get-CIVAppTemplate -Id $id.id | Remove-CIVAppTemplate -RemoveCatalogItem $false

}

Run the first part to see what there is, run it all to remove broken vApp Templates.

You will need to download the custom powershell pack from here.