大网数据广告活动
Windows排障命令

dcgpofix

· 52CE 我爱测

Reference article for the dcgpofix command, which recreates the default Group Policy Objects (GPOs) for a domain.

Recreates the default Group Policy Objects (GPOs) for a domain. To get to the Group Policy Management Console (GPMC), you must install Group Policy Management as a feature through Server Manager. Dcgpofix.exe is included with Windows Server and is located in the C:\Windows\system32\ folder.

Dcgpofix.exe restores only the policy settings that are contained in the Default Domain Policy GPO and Default Domain Controller GPO. Dcgpofix.exe doesn't restore other GPOs that administrators create, it's only intended for disaster recovery of the default GPOs.

Important: As a best practice, you should configure the Default Domain Policy GPO only to manage the default Account Policies settings, Password Policy, Account Lockout Policy, and Kerberos Policy. Additionally, you should configure the Default Domain Controllers Policy GPO only to set user rights and audit policies.

Syntax

dcgpofix [/ignoreschema] [/target: {domain | dc | both}] [/?]

Parameters

Parameter Description
/ignoreschema Ignores the version of the Active Directory schema when you run this command. Otherwise, the command only works on the same schema version as the Windows version in which the command was shipped.
`/target {domain dc
/? Displays Help at the command prompt.

Examples

To manage the default Account Policies settings, Password Policy, Account Lockout Policy, and Kerberos Policy, while ignoring the Active Directory schema version, type:

dcgpofix /ignoreschema /target:domain

To configure the Default Domain Controllers Policy GPO only to set user rights and audit policies, while ignoring the Active Directory schema version, type:

dcgpofix /ignoreschema /target:dc

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 04/16/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。