Hey,
Ok, hundreds of VMs, you didn't mention that :smileygrin:
Good news: The Stop-VM cmdlet has a -RunAsync switch, so with this activated it won't wait for the task to complete and will stop all VMs in the loop very quickly: Stop-VM - vSphere PowerCLI Cmdlets Reference
Bad news: Shutdown-VMGuest doesn't have that switch.
As a Workaround I would think about launching one instance of the script for each of your ESXi server ( depending on the number of VMs running on each ).
For example you could pass the name of your ESXi hosts as an argument to the script like .\shutdown.ps1 esxi5.domain.local
and let each instance of the script only shutdown the VMs that are running on this one ESXi server:
Get-VMHost $argument | Get-VM
Regards
Tim