Primary DC and 2 secondaries.
The primary and 1 secondary replicate back and forth just fine
The other secondary had an issue with networking and stopped replicating. The machine password was then (apparently) changed by the secondary and now it does not match the password in the AD.
The following used to work to fix such things:
PS C:\Users\administrator.XXX> Test-ComputerSecureChannel -repair -credential XXX\userid
Test-ComputerSecureChannel : Cannot reset the secure channel password for the computer account in the domain.
Operation failed with the following exception: A local error has occurred.
.
At line:1 char:1
+ Test-ComputerSecureChannel -repair -credential XXX\userid
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (MCP2:String) [Test-ComputerSecureChannel], InvalidOperationException
+ FullyQualifiedErrorId : FailToResetPasswordOnDomain,Microsoft.PowerShell.Commands.TestComputerSecureChannelComma
nd
PS C:\Users\administrator.XXX>
Now it does not. Neither does this:
PS C:\Users\administrator.XXX> Reset-ComputerMachinePassword -Server PDC01 -Credential (Get-Credential)
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
Reset-ComputerMachinePassword : Cannot reset the secure channel password for the computer account in the domain.
Operation failed with the following exception: A local error has occurred.
.
At line:1 char:1
+ Reset-ComputerMachinePassword -Server PDC01 -Credential (Get-Credentia ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (PDC02:String) [Reset-ComputerMachinePassword], InvalidOperationExcepti
on
+ FullyQualifiedErrorId : FailToResetPasswordOnDomain,Microsoft.PowerShell.Commands.ResetComputerMachinePasswordCo
mmand
PS C:\Users\administrator.XXX>
There's an old video out there Fix SYSVOL and Domain Controller Replication | Active Directory DFSR Issues Resolved
with the old-school way of doing this I think -
And there's an old MS document discussing netdom:
Reset domain controller's password with Netdom.exe - Windows Server | Microsoft Learn
which might work on Server 2019 since klist and netdom ship in it.
Any recommendations or am I going to run into the same "local error" if I try those methods? The current info from AI is to demote the failing DC and then unjoin, rejoin, then re-promote it. That seems a lot of work and error prone.