For one of some reason, you might meet in certain condition to shutdown VM forcefully. Either through vCenter or directly via ESXi. But in this scenario we are talking about how to shutdown a VM through SSH via ESXi.
It’s quite simple. Just ensure SSH service is up on associate ESXi and reachable from your workstation.
Open your putty, then connect to your ESXI, and put the correct credential. Once logged in you have to get all the VMs ID along with the process number as depicted on below.
As seen we have a VM with hostname LRCASC02 with process ID 57. Then to power off that VM all we need to is only to run following command.
Then you will no longer see such VM listed on the screen as it’s already powered off. This doable not only for power off, but also reboot.