https://www.retouw.nl/2016/07/26/installed-the-vmware-logon-monitor-now-what-lets-make-a-script/
Installed the VMware Logon monitor, now what? Let's make a script!