How to know when poweroff-vm-default.bat is executed in a Windows environment
VMware Tools
[poweroff-vm-default.bat] is the default script for VMware Tools.
The file is located in the Program Files\VMware\VMware Tools folder where VMware Tools is installed.
When you perform a [Shut Down Guest OS] command from vSphere Client / VMware Host Client, poweroff-vm-default.bat is executed.
If you [Power Off] a virtual machine from vSphere Client / VMware Host Client or shut down the guest OS, poweroff-vm-default.bat will not be executed.