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
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