PowerCLI – Simple scripts – 01 (VM Exists, Reboot, Stop & Delete)

At sometimes the simple scripts are useful to accomplish a complex task. rather than spending hours manually going through UI search and act, we can create simple PowerShell/powercli scripts.

In this article we will discuss few of them.

Check whether the VM exists in a specific cluster (remove cluster if you would like to target in a vCenter)


Reboot multiple VM’s in a cluster (remove cluster if you would like to target in a vCenter)


Stop or power-off multiple VM’s (assuming the same name of VM isn’t exist in other clusters of vCenter)


Delete multiple VM’s (please be careful and check multiple times before executing deletion since it’s a permanent data loss)

Leave a Comment

Your email address will not be published.

Scroll to Top