VMware Cloud Community
sevicrs1
Contributor
Contributor

Automating the deletion of Unsubmitted requests in vRA 6.2.4

Hello,

We have pages of un-submitted requests in vRA v6.2.4 that require us to periodically/manually (one-by-one) delete them.  For some of the older requests, the VM doesn't even exist anymore so we get an error when attempting to delete the request (so they are not delete-able from the GUI).

Is there a way to delete these un-submitted requests automatically, say after 30 days?  Perhaps using a scheduled task in vRO? or via a feature in vRA I'm not aware of?

Thank you,

Rob

0 Kudos
1 Reply
muxx
Enthusiast
Enthusiast

If anyone ever need it:

Download GitHub - jakkulabs/PowervRA: vRealize Automation PowerShell Toolkit

connect to VRA and run

$req = Get-vRARequest | where state -eq UNSUBMITTED

foreach ($item in $req) {Invoke-vRARestMethod -Method DELETE -URI "/catalog-service/api/consumer/requests/$($item.Id)"}

All UNSUBMITTED requests will be deleted. Tested on vRA 7.2.

0 Kudos