Building off an earlier demo environment script I found a better way to delay my demo batch until after vCenter starts, by levering Sysinternal’s plist.exe utility:
REM Wait for vCenter to start.
:Wait
c:\progra~1\pstools\pslist.exe \\vCenter | find “vpxd”
IF NOT ERRORLEVEL 1 goto :Continue
IF ERRORLEVEL 1 goto :Wait
:Continue
This has proven much more reliable than waiting for a ping response from the networking stack!
You could have used the native “query process vpxd.exe” command instead
Interesting, I have not heard of that utility before. It has parameters to pull the services list from a remote machine but when I try it I get a “specify process” message.
I’ll play with it.
Thanks
Josh