Applies To: Windows Server 2003, Windows Vista, Windows XP, Windows Server 2008, Windows 7, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2000, Windows Server 2012, Windows 8

Allows you to configure the current system settings using security settings stored in a database. For examples of how this command can be used, see Examples.


Secedit /configure /db <database file name> [/cfg <configuration file name>] [/overwrite] [/areas SECURITYPOLICY | GROUP_MGMT | USER_RIGHTS | REGKEYS | FILESTORE | SERVICES] [/log <log file name>] [/quiet]






Specifies the path and file name of a database that contains the stored configuration.

If file name specifies a database that has not had a security template (as represented by the configuration file) associated with it, the /cfg <configuration file name> command-line option must also be specified.



Specifies the path and file name for the security template that will be imported into the database for analysis.

This /cfg option is only valid when used with the /db <database file name> parameter. If this is not specified, the analysis is performed against any configuration already stored in the database.



Specifies whether the security template in the /cfg parameter should overwrite any template or composite template that is stored in the database instead of appending the results to the stored template.

This command-line option is only valid when the /cfg <configuration file name> parameter is also used. If this is not specified, the template in the /cfg parameter is appended to the stored template.



Specifies the security areas to be applied to the system. If this parameter is not specified, all security settings defined in the database are applied to the system. To configure multiple areas, separate each area by a space. The following security areas are supported:

  • SecurityPolicy

    Local policy and domain policy for the system, including account policies, audit policies, security options, and so on.

  • Group_Mgmt

    Restricted group settings for any groups specified in the security template.

  • User_Rights

    User logon rights and granting of privileges.

  • RegKeys

    Security on local registry keys.

  • FileStore

    Security on local file storage.

  • Services

    Security for all defined services.



Specifies the path and file name of the log file for the process.



Suppresses screen and log output. You can still view analysis results by using the Security Configuration and Analysis snap-in to the Microsoft Management Console (MMC).


If the path for the log file is not provided, the default log file, (systemroot\Users \UserAccount\My Documents\Security\Logs\DatabaseName.log) is used.

Beginning with Windows Server 2008, Secedit /refreshpolicy has been replaced with gpupdate. For information on how to refresh security settings, see Gpupdate.


Perform the analysis for the security parameters on the security database, SecDbContoso.sdb, you created using the Security Configuration and Analysis snap-in. Direct the output to the file SecAnalysisContosoFY11 with prompting so you can verify the command ran correctly.

Secedit /analyze /db C:\Security\FY11\SecDbContoso.sdb /log C:\Security\FY11\SecAnalysisContosoFY11.log

Let’s say that the analysis revealed some inadequacies so the security template, SecContoso.inf, was modified. Run the command again to incorporate the changes, directing the output to the existing file SecAnalysisContosoFY11 with no prompting.

Secedit /configure /db C:\Security\FY11\SecDbContoso.sdb /cfg SecContoso.inf /overwrite /log C:\Security\FY11\SecAnalysisContosoFY11.xml /quiet

Additional references