Lots of Win7 VMs, that I want to automatically shutdown when a user logs off. My problem is I cannot start gpedit.msc on every machine, and edit user config -> windows settings -> scripts (logon/logoff)
Simply placing a cmd file in %WINDIR%System32GroupPolicyUserScriptsLogoff also doesn’t work – I need to enable the policy somehow.
AD is not an option in this case.
So my question is – is there a way, within a script, to place the cmd script in the right location and also update the GPO that uses this cmd file?