Automatic revert a vmware snapshot for all virtual machines with Vbscript
Dim objShell,msg
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("""C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe"" -T ws list")
Set objStdOut = objWshScriptExec.StdOut
count = 0
Do Until objStdOut.AtEndOfStream
countN = 0
count = count+1
strLine = objStdOut.ReadLine
If count>1 Then
Set objShellN = CreateObject("WScript.Shell")
Set objWshScriptExecN = objShellN.Exec("""C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe"" -T ws listSnapshots " & """" & strLine & """")
Set objStdOutN = objWshScriptExecN.StdOut
Do Until objStdOutN.AtEndOfStream
countN = countN+1
strLineN = objStdOutN.ReadLine
If countN>1 Then
Set objShellV = CreateObject("WScript.Shell")
objShellV.Run("""C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe"" -T ws revertToSnapshot " & """" & strLine & """" & " " & strLineN)
WScript.Sleep(15000)
End If
Loop
Set objShellX = CreateObject("WScript.Shell")
objShellX.Run("""C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe"" start " & """" & strLine & """")
WScript.Sleep(15000)
End If
Loop
WScript.Quit
And if you have 32bit system simply change "
Program Files (x86)" with "Program Files"