List all the VMs that are registered in this ESXi host:
This will give us the VMID of all the VMs, take this above SHD VM as an example, the VMID is 2.
Verify the VM power status
vim-cmd vmsvc/power.getstate <Vmid>
Shutdown the VM by command:
vim-cmd vmsvc/power.shutdown VMID