This shell script snipped will remove all your services from the vRAs items list. We asume that CloudUtil is able to log in automatically. This can be achieved by setting the ‘configuration’ as described in my previous post.
for VMID in $(./cloudclient.sh vra provisioneditem list --format CSV|cut -d, -f1);
do
./cloudclient.sh vra provisioneditem action execute --id "$VMID" --action Destroy;
doneThe first command vra provisioneditems list receives a list of items owned by the logged in user.
The second part loops over this list and fires a Destroy action on each item.
That’s it.