將網域控制站升級至更新版本的 Windows Server

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2016

本文提供有關 Windows Server 中 Active Directory Domain Services 的背景資訊,並說明從舊版 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 角色,請使用作為 Domain Admins 群組成員的帳戶,在提升權限的 PowerShell 工作階段中執行下列命令:

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

安裝動作和必要的系統管理層級

下表提供安裝動作的摘要,以及完成這些步驟的權限需求。

安裝動作 認證要求
安裝新樹系。 目標伺服器上的本機系統管理員
在現有樹系中安裝新網域。 Enterprise Admins
在現有網域中安裝另一個 DC。 Domain Admins
執行 adprep /forestprep Schema Admins、Enterprise Admins 和 Domain Admins
執行 adprep /domainprep Domain Admins
adprep /domainprep /gpprep.執行 Domain Admins
執行 adprep /rodcprep Enterprise Admins

支援的就地升級路徑

僅支援 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 執行的樹系功能等級比作業系統支援的還舊,則安裝會遭到封鎖。 必須移除這些 DC,並將樹系功能等級提升至支援的版本,然後再將較新的 Windows Server 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 Domain Services 互通性

下列 Windows 作業系統上不支援 Active Directory Domain Services:

  • Windows MultiPoint Server
  • Windows Server Essentials

Active Directory Domain Services 無法安裝在也執行下列伺服器角色或角色服務的伺服器上:

  • 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. 在 [伺服器管理員] 的 [新增角色及功能] 底下,將 Active Directory Domain Services 安裝在新的 Windows Server 上。 此動作會自動在舊版樹系和網域上執行 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。

下一步