VMware Cloud Community
hemantkarole
Contributor
Contributor

VM shutdown script

i need to create script that connect to esxi or vcenter and import the csv and shutdown the vms without confirmation not gracefully required. Also need to delete the VMs from datastore

Tags (1)
0 Kudos
1 Reply
cykVM
Expert
Expert

Hi,

I would use PowerCLI for that. Someone already did something similar, see PowerCLI - Power off a list of VMs or Using PowerShell to Gracefully Shut Down Multiple Virtual Machines in VMware | Pipe2Text.com

For the deletion you may use Remove-VM vSphere 6.0 Documentation Center

cykVM

0 Kudos