This script connects to a vCenter server and shuts down all running VMs.
VMs with VMware Tools installed will be gracefully shut down, others will be powered off.
You can specify a VM that should be shut down last using the -LastVM parameter.
If no last VM is specified, you will be prompted to select one.