本文介绍有关 Windows Server 中的 Active Directory 域服务的背景信息,并说明从早期版本的 Windows Server 升级域控制器 (DC) 的过程。
Prerequisites
升级域的建议方法是将新服务器提升到运行较新版本 Windows Server 的 DC,并根据需要降级较旧的 DC。 此方法优于升级现有 DC 的操作系统(也称为就地升级)。
在将服务器提升为运行较新版本 Windows Server 的 DC 之前,请遵循以下常规步骤:
Verify the target server meets the system requirements.
验证应用程序兼容性。
查看有关迁移到较新版本 Windows Server 的建议。
验证安全设置。
从计划运行安装的计算机上检查与目标服务器的连接性。
检查 Active Directory 中必需的灵活单主机操作 (FSMO) 角色的可用性。 对于以下情况,此步骤是必需的:
- 若要在现有域和林中安装第一个运行最新 Windows Server 版本的 DC,运行安装的计算机需要连接到:
- The schema master to run
adprep /forestprep
. - The infrastructure master to run
adprep /domainprep
.
- The schema master to run
- To install the first DC in a domain where the forest schema is already extended, you only need connectivity to the infrastructure master.
- 若要在现有林中安装或删除域,则需要连接至“域命名主机”。
- Any DC installation also requires connectivity to the RID master.
- If you're installing the first read-only DC in an existing forest, you need connectivity to the infrastructure master for each application directory partition, which is also known as a non-domain naming context.
若要了解哪个或哪些服务器拥有哪个 FSMO 角色,请使用属于域管理员组成员的帐户在提升的 PowerShell 会话中运行以下命令:
Get-ADDomain | FL InfrastructureMaster, RIDMaster, PDCEmulator Get-ADForest | FL DomainNamingMaster, SchemaMaster
- 若要在现有域和林中安装第一个运行最新 Windows Server 版本的 DC,运行安装的计算机需要连接到:
安装操作和所需的管理级别
下表汇总了完成这些步骤的安装操作和权限要求。
Installation action | Credential requirements |
---|---|
安装一个新林。 | 目标服务器上的本地管理员 |
在现有林中安装一个新域。 | Enterprise admins |
在现有域中安装另一个 DC。 | Domain admins |
运行 adprep /forestprep 。 |
架构管理员、企业管理员和域管理员 |
运行 adprep /domainprep 。 |
Domain admins |
adprep /domainprep /gpprep. 运行 |
Domain admins |
运行 adprep /rodcprep 。 |
Enterprise admins |
支持的就地升级路径
仅支持 64 位版本升级。 有关支持的升级路径的详细信息,请参阅支持的升级路径。
Adprep - forestprep 和 domainprep
若要就地升级现有 DC,必须手动运行 adprep /forestprep
和 adprep /domainprep
。 对于每个较新版本的 Windows Server,只需在林中运行 Adprep /forestprep
一次。 在每个域中运行 Adprep /domainprep
一次,其中包含要为每个较新版本的 Windows Server 升级的 DC。
如果要将新服务器提升到 DC,则无需手动运行这些命令行工具。 它们已集成到 PowerShell 和服务器管理器体验中。
For more information on running adprep, see Running Adprep.
功能级别的特性和要求
Windows Server 2019 或更高版本至少需要 Windows Server 2008 林功能级别。 Windows Server 2016 至少需要 Windows Server 2003 林功能级别。 如果林中包含的 DC 运行的林功能级别低于操作系统支持的级别,则会阻止安装。 在将较新的 Windows Server DC 添加到林之前,必须删除这些 DC 并将林功能级别提升到受支持的版本。 有关支持的功能级别的详细信息,请参阅林和域功能级别。
Note
自 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 服务器
- 远程桌面连接代理
管理 Windows Server
使用 Windows 10 或更高版本的远程服务器管理工具来管理运行 Windows Server 的域控制器和其他服务器。 你可以在运行 Windows 10 或更高版本的计算机上运行 Windows Server 远程服务器管理工具。
使用较新版本的 Windows Server 添加新的域控制器
以下示例演示如何将 Contoso 林从以前版本的 Windows Server 升级到更高版本。
将新的 Windows Server 加入林。 得到提示后重启。
使用域管理员帐户登录到新的 Windows Server。
In Server Manager, under Add Roles and Features, install Active Directory Domain Services on the new Windows Server. 此操作会自动在早期版本的林和域上运行 adprep。
In Server Manager, select the yellow triangle. 在下拉列表中,选择“将服务器提升为域控制器”。
On the Deployment Configuration screen, select Add a domain controller to an existing domain and click next.
在“域控制器选项”屏幕上,输入“目录服务还原模式 (DSRM)”密码,然后选择“下一步”。
For the rest of the screens, select Next.
On the Prerequisite Check screen, select Install. 重启完成后,再次登录。
On the earlier version of Windows Server, in Server Manager, under Tools, select Active Directory Module for Windows PowerShell.
在 PowerShell 窗口中,使用
Move-ADDirectoryServerOperationMasterRole
cmdlet 移动 FSMO 角色。 可以输入每个操作主机角色的名称,或使用数字来指定角色。 For more information, see Move-ADDirectoryServerOperationMasterRole.Move-ADDirectoryServerOperationMasterRole -Identity "DC-W2K16" -OperationMasterRole 0,1,2,3,4
若要验证角色是否已移动,请转到新的 Windows Server。 In Server Manager, under Tools, select Active Directory Module for Windows PowerShell. 使用
Get-ADDomain
和Get-ADForest
cmdlet 查看 FSMO 角色持有者。降级并删除较早的 Windows Server DC。 有关如何降级 DC 的信息,请参阅降级域控制器和域。
降级并删除服务器后,可以将林功能和域功能级别提升到最新版本的 Windows Server。