Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

How to modify/alter a GPO backup by script

$
0
0

Hi!

I'm working on a program which requires some GPOs. I would like to make the process of creating the GPOs easier for the admin so he doesn't have to create these GPOs all by himself. My program determines if a needed GPO is already existent. If not it should restore a backup of the GPO. I can do all these steps with the RSAT scripts. However, it is necessary that one of the GPOs is being modified before it is actually restored. The change must be done in 

Computer Configuration / Administrative Templates / System / Logon / Run these programs at user logon

The content of this GPO setting is a rather long and complicated string, admins often make mistakes here and you won't believe how many admins have no idea of how to create a GPO at all. So for "improved user experience" I want my program to do that for the user. The plan is to deploy the GPO backup to the admin along with my software, then let my software do the needed modifications to the backup files and then import that modified backup. Sounds simple and it is simple for GPO backups that can be used without modification. 

I've looked through the backup files and found the place where the setting for "Run these programs at user logon" can be found. It seems like I can try to rebuild the content of that part of the backup, but that's much more "hacking stuff" that I ususally prefer. I was wondering if there is a better (and maybe even supported way) of importing customized GPOs by script/program or if anyone has an idea how to easily modify the backup files according to our needs.

I'm aware that this may sound like a project that is suitable for malware deployment. Believe me, it isn't.

Thanks in advance!

T.


Viewing all articles
Browse latest Browse all 19997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>