I am trying to automate adding startup and shutdown scripts to Local Group Policy (gpedit.msc). One solution is to write to registry directly as pointed out in http://ccm.net/faq/3358-execute-a-script-a-startup-and-shutdown. I'm looking for a way to do it via powershell script using the GroupPolicy module. I want to know if this is possible/anyone has succeeded in doing this?
UPDATE: After reading through msdn articles, I figured out that we can access domain group policy objects but the local group policy object (which contains the startup and shutdown scripts) is stored in registry. I am trying to find a way to access and edit this local GPO through powershell.