備忘録的な意味合いとして雑に残しておきます。
エラー内容
ドメインコントローラー降格時に 「ディレクトリサービスで必須の構成情報が不足しているため、浮動単一マスター操作の役割に対する所有権を判断できません。」 というエラーが出ました。
FSMOの役割を強制的に移行した場合に起こるらしい。
環境はWindowsServer 2019
ドメインの機能レベル:WindowsServer 2016
フォレストの機能レベル:WindowsServer 2016
です。
解決方法
Microsoftが公開しているKnowlgeBase949257内のfixfsmo.vbsをデスクトップなどサーバー内の任意の場所に保存します。
コマンドプロンプトを開き以下のコマンドをそれぞれ入力します。
cscript fixfsmo.vbs DC=ForestDnsZones,DC=contoso,DC=com
cscript fixfsmo.vbs DC=DomainDnsZones,DC=contoso,DC=com
コマンド実行後に再度通常通りの手順でドメインコントローラーの降格を行えばエラーなく降格できるはずです。
『DC=contoso,DC=com』の部分はそれぞれの環境で異なります。
例えばドメイン名が sudare.local だった場合は「DC=sudare,DC=local」と書き換えましょう。
念のためfixfsmo.vbsのスクリプトを以下に記載しておきます。
fixfsmo.vbs
fixfsmo.vbs
'-------fixfsmo.vbs------------------
const ADS_NAME_INITTYPE_GC = 3
const ADS_NAME_TYPE_1779 = 1
const ADS_NAME_TYPE_CANONICAL = 2
set inArgs = WScript.Arguments
if (inArgs.Count = 1) then
' Assume the command line argument is the NDNC (in DN form) to use.
NdncDN = inArgs(0)
Else
Wscript.StdOut.Write "usage: cscript fixfsmo.vbs NdncDN"
End if
if (NdncDN <> "") then
' Convert the DN form of the NDNC into DNS dotted form.
Set objTranslator = CreateObject("NameTranslate")
objTranslator.Init ADS_NAME_INITTYPE_GC, ""
objTranslator.Set ADS_NAME_TYPE_1779, NdncDN
strDomainDNS = objTranslator.Get(ADS_NAME_TYPE_CANONICAL)
strDomainDNS = Left(strDomainDNS, len(strDomainDNS)-1)
Wscript.Echo "DNS name: " & strDomainDNS
' Find a domain controller that hosts this NDNC and that is online.
set objRootDSE = GetObject("LDAP://" & strDomainDNS & "/RootDSE")
strDnsHostName = objRootDSE.Get("dnsHostName")
strDsServiceName = objRootDSE.Get("dsServiceName")
Wscript.Echo "Using DC " & strDnsHostName
' Get the current infrastructure fsmo.
strInfraDN = "CN=Infrastructure," & NdncDN
set objInfra = GetObject("LDAP://" & strInfraDN)
Wscript.Echo "infra fsmo is " & objInfra.fsmoroleowner
' If the current fsmo holder is deleted, set the fsmo holder to this domain controller.
if (InStr(objInfra.fsmoroleowner, "\0ADEL:") > 0) then
' Set the fsmo holder to this domain controller.
objInfra.Put "fSMORoleOwner", strDsServiceName
objInfra.SetInfo
' Read the fsmo holder back.
set objInfra = GetObject("LDAP://" & strInfraDN)
Wscript.Echo "infra fsmo changed to:" & objInfra.fsmoroleowner
End if
End if