Security – Use SECEDIT to export “Security Options” from one computer and import on another

Securitywindows-server-2008

Can I use secedit.exe to export out the "Security Options" from the local security policy and then import them on another machine?

I'm trying to do this on Windows Server 2008.

Update

I just tried with:

secedit /export /db C:\andy.db /cfg C:\andy.inf /areas SECURITYPOLICY /log C:\andy.log

But it didn't work with error:

Warning 2: The system cannot find the file specified.
    Error opening C:\andy.db.

Where do I get the DB file from?

Best Answer

I had to do the same thing a while ago to setup a Server Core system with a security policy. Here are my scratch notes:

Export:

secedit /export /db secedit.sdb /cfg sctest.inf 

Import:

# NOTE: May not work if you're in a read-only directory, 
#       or sctest.inf is read-only
secedit /configure /db secedit.sdb /cfg sctest.inf /overwrite