Here is at BASH script to power off all active VM’s on a host.
for vm in `vmware-cmd -l`
name=`vmware-cmd “$vm” getconfig displayname -q`
state=`vmware-cmd “$vm” getstate -q`
if [ “$state” == “on” ]
echo “Trying to power off $name….”
output=`vmware-cmd “$vm” stop trysoft`
if [ $? -eq 0 ]; then
echo “$name was powered off successfully.”
The script was posted by Alex at the VMTN forum a while back, but is now updated so i reports if the VM is powered off succesfully.