It was brought to my attention that vmware-cmd can not gracefully shutdown a Windows VM when the console is locked. Yesterday I spent sometime researching the issue and the guys at Sysinternals once again have coded a quality utility that appears to have solved the problem. I only hope that they can maintain the same level of quality now that Microsoft has acquired them.
Download psshutdown here
To shutdown a single host the syntax looks like this:
psshutdown \\host -t 5 -f -m “Shutting down in 5 seconds”
To shutdown multiple hosts psshutdown takes input from a file (e.g. – hosts.txt) where the host names or IP are separated by a
psshutdown @hosts.txt -t 5 -f -m “Shutting down in 5 seconds”
To shutdown a single host when not logged in as a privileged user you will need to pass credentials to the the psshutdown command:
psshutdown @hosts.txt -t 5 -f -m “Shutting down in 5 seconds” -u administrator -p password
The standard windows cli shutdown command also works if you use the force option (-f). The thing I really like about psshutdown is the ability to pass a file with a list of hosts and the ability to pass user credentials.