VMware Aria Automation Tools

 View Only
  • 1.  How to remove all deployments for a project handover?

    Posted Jan 03, 2025 08:39 AM

    Hi, what is the quickest way to remove all deployments for a project handover? Other than deleting it one by one, I have thousands of them!



  • 2.  RE: How to remove all deployments for a project handover?

    Posted Jan 03, 2025 09:22 AM

    You can query postgresDB using project ID, then remove all deployment inside that project ID



    ------------------------------
    Tarek Nader
    www.linkedin.com/in/tnader-70853361
    ------------------------------



  • 3.  RE: How to remove all deployments for a project handover?

    Broadcom Employee
    Posted Jan 10, 2025 01:44 PM

    We do not recommend direct modifications to the database without support or engineering guidance.




  • 4.  RE: How to remove all deployments for a project handover?

    Posted Jan 03, 2025 05:28 PM

    If you prefer PowerShell and PowerCLI, you can script the deletion of deployments.

    Steps:

    1. Connect to Aria Automation:

      Connect-vRA -Server "<vra-instance>" -Credential (Get-Credential)
    2. List Deployments for the Project:

      $Project = Get-vRAProject -Name "<Project_Name>" $Deployments = Get-vRADeployment -ProjectId $Project.Id
    3. Delete Deployments in a Loop:

      foreach ($Deployment in $Deployments) { Remove-vRADeployment -Id $Deployment.Id -Confirm:$false Write-Host "Deleted deployment: $($Deployment.Name)" }