将域控制器升级到较新版本的 Windows Server

适用范围:Windows Server 2022、Windows Server 2019、Windows Server 2016

本文介绍有关 Windows Server 中的 Active Directory 域服务的背景信息,并说明从早期版本的 Windows Server 升级域控制器 (DC) 的过程。

先决条件

升级域的建议方法是将新服务器提升到运行较新版本 Windows Server 的 DC,并根据需要降级较旧的 DC。 此方法优于升级现有 DC 的操作系统(也称为就地升级)。

在将服务器提升为运行较新版本 Windows Server 的 DC 之前,请遵循以下常规步骤:

  1. 验证目标服务器是否满足系统要求

  2. 验证应用程序兼容性。

  3. 查看有关迁移到较新版本 Windows Server 的建议。

  4. 验证安全设置。

  5. 从计划运行安装的计算机上检查与目标服务器的连接性。

  6. 检查 Active Directory 中必需的灵活单主机操作 (FSMO) 角色的可用性。 对于以下情况,此步骤是必需的:

    • 若要在现有域和林中安装第一个运行最新 Windows Server 版本的 DC,运行安装的计算机需要连接到:
      • 要运行 adprep /forestprep 的架构主机。
      • 要运行 adprep /domainprep 的基础结构主机。
    • 若要在已扩展林架构的域中安装第一个 DC,则只需连接至“基础结构主机”即可。
    • 若要在现有林中安装或删除域,则需要连接至“域命名主机”。
    • 任何 DC 安装也需要连接至“RID 主机”。
    • 如果在现有林中安装第一个只读 DC,则需要为每一个应用程序目录分区(也称作非域命名上下文)连接至“基础结构主机”。

    若要了解哪个或哪些服务器拥有哪个 FSMO 角色,请使用属于域管理员组成员的帐户在提升的 PowerShell 会话中运行以下命令:

    Get-ADDomain | FL InfrastructureMaster, RIDMaster, PDCEmulator
    Get-ADForest | FL DomainNamingMaster, SchemaMaster
    

安装操作和所需的管理级别

下表汇总了完成这些步骤的安装操作和权限要求。

安装操作 凭据要求
安装一个新林。 目标服务器上的本地管理员
在现有林中安装一个新域。 企业管理员
在现有域中安装另一个 DC。 域管理员
运行 adprep /forestprep 架构管理员、企业管理员和域管理员
运行 adprep /domainprep 域管理员
运行 adprep /domainprep /gpprep. 域管理员
运行 adprep /rodcprep 企业管理员

支持的就地升级路径

仅支持 64 位版本升级。 有关支持的升级路径的详细信息,请参阅支持的升级路径

Adprep - forestprep 和 domainprep

若要就地升级现有 DC,必须手动运行 adprep /forestprepadprep /domainprep。 对于每个较新版本的 Windows Server,只需在林中运行 Adprep /forestprep 一次。 在每个域中运行 Adprep /domainprep 一次,其中包含要为每个较新版本的 Windows Server 升级的 DC。

如果要将新服务器提升到 DC,则无需手动运行这些命令行工具。 它们已集成到 PowerShell 和服务器管理器体验中。

有关运行 adprep 的详细信息,请参阅运行 Adprep

功能级别的特性和要求

Windows Server 2019 或更高版本至少需要 Windows Server 2008 林功能级别。 Windows Server 2016 至少需要 Windows Server 2003 林功能级别。 如果林中包含的 DC 运行的林功能级别低于操作系统支持的级别,则会阻止安装。 在将较新的 Windows Server DC 添加到林之前,必须删除这些 DC 并将林功能级别提升到受支持的版本。 有关支持的功能级别的详细信息,请参阅林和域功能级别

注意

自 Windows Server 2016 以来,没有添加新的林或域功能级别。 更高版本的操作系统可以且应该用于域控制器。 它们使用 Windows Server 2016 作为最新的功能级别。

回滚功能级别

将林功能级别设置为某个值之后,就不能回滚或降低林功能级别,但有一种情况例外:

  • 如果要从 Windows Server 2012 R2 林功能级别升级,可以回滚到 Windows Server 2012 R2。
  • 如果要从 Windows Server 2008 R2 林功能级别升级,可以回滚到 Windows Server 2008 R2。

将域功能级别设置为某个值之后,就不能回滚或降低域功能级别,但有一种情况例外:

  • 将域功能级别提升到 Windows Server 2016 并且林功能级别为 Windows Server 2012 或更低时,可以选择将域功能级别回滚到 Windows Server 2012 或 Windows Server 2012 R2。

有关每个功能级别可用的功能的详细信息,请参阅林和域功能级别

Active Directory 域服务互操作性

以下 Windows 操作系统不支持 Active Directory 域服务:

  • Windows MultiPoint Server
  • Windows Server Essentials

Active Directory 域服务不能安装在同时运行以下服务器角色或角色服务的服务器上:

  • Microsoft Hyper-V Server
  • 远程桌面连接代理

管理 Windows Server

使用 Windows 10 或更高版本的远程服务器管理工具来管理运行 Windows Server 的域控制器和其他服务器。 你可以在运行 Windows 10 或更高版本的计算机上运行 Windows Server 远程服务器管理工具。

使用较新版本的 Windows Server 添加新的域控制器

以下示例演示如何将 Contoso 林从以前版本的 Windows Server 升级到更高版本。

  1. 将新的 Windows Server 加入林。 得到提示后重启。

    Screenshot of the Server Manager showing the Systems Properties and Computer Name/Domain Changes dialog boxes.

  2. 使用域管理员帐户登录到新的 Windows Server。

  3. 在“服务器管理器”的“添加角色和功能”下,在新 Windows Server 上安装“Active Directory 域服务”。 此操作会自动在早期版本的林和域上运行 adprep。

    Screenshot of the Select server roles page of the Add Roles and Features Wizard showing the Active Directory Domain Services option highlighted.

  4. 在“服务器管理器”中,选择黄色三角形。 在下拉列表中,选择“将服务器提升为域控制器”。

    Screenshot of the Post-deployment Configuration progress dialog box with the Promote the server to a domain controller option called out.

  5. 在“部署配置”屏幕上,选择“将新域添加到现有林”,然后选择“下一步”。

    Screenshot of the Deployment Configuration page of the Active Directory Domain Services Configuration Wizard showing the Add a new domain to an existing forest option selected.

  6. 在“域控制器选项”屏幕上,输入“目录服务还原模式 (DSRM)”密码,然后选择“下一步”。

  7. 对于其余屏幕,请选择“下一步”。

  8. 在“先决条件检查”屏幕上,选择“安装”。 重启完成后,再次登录。

  9. 在早期版本的 Windows Server 上,在“服务器管理器”中的“工具”下,选择“用于 Windows PowerShell 的 Active Directory 模块”。

    Screenshot of the Tools drop-down list in the Server Manager with the Active Directory Module for Windows PowerShell option called out.

  10. 在 PowerShell 窗口中,使用 Move-ADDirectoryServerOperationMasterRole cmdlet 移动 FSMO 角色。 可以输入每个操作主机角色的名称,或使用数字来指定角色。 有关详细信息,请参阅 Move-ADDirectoryServerOperationMasterRole

    Move-ADDirectoryServerOperationMasterRole -Identity "DC-W2K16" -OperationMasterRole 0,1,2,3,4
    

    Screenshot of the Active Directory Module for Windows PowerShell window showing the results of the Move-ADDirectoryServerOperationMasterRole cmdlet.

  11. 若要验证角色是否已移动,请转到新的 Windows Server。 在“服务器管理器”中的“工具”下,选择“用于 Windows PowerShell 的 Active Directory 模块”。 使用 Get-ADDomainGet-ADForest cmdlet 查看 FSMO 角色持有者。

    Screenshot of the Active Directory Module for Windows PowerShell window showing the results of the Get-ADDomain cmdlet with the Infrastructure Master, P D C Emulator, and R I D Master values called out.

    Screenshot of the Active Directory Module for Windows PowerShell window showing the results of the Get-ADForest cmdlet with the Domain Naming Master and Schema Master values called out.

  12. 降级并删除较早的 Windows Server DC。 有关如何降级 DC 的信息,请参阅降级域控制器和域

  13. 降级并删除服务器后,可以将林功能和域功能级别提升到最新版本的 Windows Server。

后续步骤