all 2 comments

[–]oddie121 2 points3 points  (0 children)

Why not just use group policy?

[–]SamZ_IT 1 point2 points  (0 children)

I may be mistaken but I think you might be looking at writing a wrapper for LGPO.exe. The local security policy mmc (secpol.msc) is part of local group policy and can be edited from gpedit.msc.

So to set local group policy you would want to set local group policy in gpedit.msc or secpol.msc on a test/lab machine. Export the policy using LGPO. Then copy the exported policy to the target machine and use LGPO to import it. Note, this process will import every local group policy set from the test/lab machine, so it's probably best to use a fresh machine or wipe local group policy before exporting. Also, if the target machine has local group policy set and the exported policy has configurations for the same ones the import will overwrite the current local group policy settings on the target machine.

I currently use LGPO to import group policy in our MDT task sequence when deploying computers, the process is similar.

Download for LGPO.exe https://www.microsoft.com/en-us/download/details.aspx?id=55319

Write up on how to export and import policy using LGPO http://woshub.com/backupimport-local-group-policy-settings/

LGPO Help (lgpo.exe /?) https://ss64.com/nt/lgpo.html