Reply to Message

View discussion in a popup

Replying to:
wx1996
Contributor
Contributor

I found a way to suspend ALL VMs not just shared ones.  In Windows 10 and Workstation Pro 14 the following works for me.  The VMrun command appears to be part of the player as well, so this might work for you to suspend all you player images on system shutdown.

Create a script to run during system Shutdown - i named mine SuspendVMs.bat

-------------------------------------

cd C:\Program Files (x86)\VMware\VMware Workstation

for /f  %%G in ('vmrun list') DO vmrun suspend %%G"

exit

-------------------------------------

The above file creates one error command but does not slow down the suspend - and postpones the sustem restart or shutdown until ALL VMs are suspended

Please the file in C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown

then Edit Group policies to run it - reference

https://lifehacker.com/use-group-policy-editor-to-run-scripts-when-shutting-do-980849001

basically run gpedit.msc

then

Computer configuration

Windows Settings

Scripts(Startup/Shutdown)

on right side double click shutdown

the ADD the script to the list