Windows Server:如何正確重新命名 Active Directory 網域控制站

Summary: 本文說明重新命名 Active Directory (AD) 網域控制站 (DC) 的程序。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

警示:重新命名 DC 並不像在「系統屬性」視窗中更改伺服器名稱那麼簡單。這似乎有效:操作完成,沒有任何錯誤,伺服器重新啟動。但是,嘗試以這種方式重命名DC可能會導致身份驗證問題,包括無法從DC登錄到域。如果不從備份還原 DC 或重新安裝作業系統,可能無法從這些問題中恢復。

通常不需要重新命名 DC。如果必須這樣做,建議的過程是降級DC,重命名它,然後重新升級它。如果這不可行,下列步驟提供已在 Windows Server 2019 中執行且無不良影響的替代方法。在顯示的命令中,<oldname> 代表 DC 的舊完整網域名稱 (FQDN),newname<> 代表其新的 FQDN。
 
注意:開始此程序之前,請確定 DC 已完整備份。DC 的可用備份必須包含其系統狀態。此外,請確認 AD 和 SYSVOL 複寫在整個網域中都能正常運作。
  1. 在提升權限的命令提示字元中,輸入 netdom computername <oldname> /add:<newname>。輸出應指示新名稱已成功添加為DC的備用名稱。
    netdom computername oldname /add:newname 命令的輸出
  2. 若要確認已新增名稱,請鍵入 netdom computername <oldname> /enumerate。這兩個名稱都應列在輸出中。
    netdom computername oldname /enumerate 命令的輸出
  3. 類型 netdom computername <oldname> /makeprimary:<newname> 將新的 FQDN 設定為 DC 的主要名稱。輸出應指示此操作已成功。它還將指示需要重新啟動。
    netdom computername oldname /makeprimary:newname 命令的輸出
  4. 將 DC 重新開機。
  5. 啟動提升權限的命令提示字元,然後輸入 netdom computername <newname> /remove:<oldname> 以從DC的名稱清單中刪除舊的 FQDN。
    netdom computername newname /remove:oldname 命令的輸出
  6. 透過鍵入以下內容來確認舊名稱已被刪除 netdom computername <newname> /enumerate。新的 FQDN 應該是輸出中唯一列出的名稱。DC 現已重新命名。
    netdom computername newname /enumerate 命令的輸出

Affected Products

Microsoft Windows Server 2016, Microsoft Windows Server 2019, Microsoft Windows Server 2022, Microsoft Windows 2012 Server, Microsoft Windows 2012 Server R2
Article Properties
Article Number: 000226230
Article Type: How To
Last Modified: 18 Dec 2024
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.