I'm trying to make it easy to add a LogOff script to Group Policy and am having difficulty finding any information on adding Group Policy via script.
I already have the script I want to run at Logoff, I know how to run scripts via Group Policy. I want to know if Group Policy itself can be managed by script.
I do not have access to modify group policy for the domain or even for my OU, however, I can add entries to the local computer policy.
I've tried isolating registry entries created and changed when adding a Group Policy script, but quickly found this to be prohibitive in its difficulty and complexity. Maybe I read the comparison wrong, but there seemed to be quite a bit changed in just one Group Policy change.
So I've fallen back to scripting. Using either VBScript or Batch, can I add an entry to Local Computer Policy\User Configuration\Scripts\Logoff using a script?
UPDATE: Any tips on how to better isolate registry changes made during GP change would be appreciated if this the only (or best) way to go.