VMware Cloud Community
URotheut
Contributor
Contributor

How to delete VMs from vCD via powerCli?

Hello

for test purposes, I frequently have to remove VMs from a vApp in vCloud Director. As I would like to do it 'properly', I do not want to delete the VMs by connecting to a vCenter and run remove-vm.

get-civm ... | remove-vm ... does not work. I get the following message: Cannot validate argument on parameter 'VM'. The argument is null or empty...

Any help is appreciated!

Thanks a lot

Uschi

0 Kudos
2 Replies
AdamRushUK
Enthusiast
Enthusiast

Have you tried this? Deleting CIVM from a CIvApp

VCP-Cloud | VCP5-DCV | MCITP:EA | MCSE | CCNA | CCAA LinkedIn: https://www.linkedin.com/in/adamrushuk | Twitter : @adamrushuk
0 Kudos
URotheut
Contributor
Contributor

Hello

sorry for the late response, but at that point of time in the end I did it manually.

Tried now the script that was proposed, it runs without errors, but nothing is happening. I will probably to some debugging later..

0 Kudos