For Virtual Machines:
--------------------------------
Set automatic shutdown action to PowerOFF on the ESXi server. The Vms will be powered off automatically.
For ESXi;
--------------
1. If the ESXi hosts are connected to a vCenter server, then use PowerCLI andthe below script by LucD to shutdown the ESxi servers;
$names = "esxi-1","esxi-2"
connect-VIServer -Server $names -User root -Password Password1 | %{
Get-VMHost -Server $_ | %{
$_.ExtensionData.ShutdownHost_Task($TRUE)
}
}
or
2.
a. Download any ssh client like Putty
b. Connect to ESXi server
c. issue "shutdown"
~dGeorgey