如何重置Active Directory安全通道如果损坏

偶尔,计算机帐户可能会失去其到域控制器的安全通道。

无需重新启动计算机,如何重置安全通道?

有问题的计算机是在2008 R2function级Active Directory域和林中运行Server 2008 R2的群集SQL Server。

我有一些机器会决定使用远程域控制器(我们的WAN上的其他地方),因为它是login服务器,而不是本地networking驱动器。 可以通过直接重置安全通道来解决:

nltest /sc_reset:<domain>\<domain controller> 

nltest.exe可以用来检查通道并尝试重置它。

 nltest.exe /sc_verify:<fully.qualified.domain.name.here> 

如果不这样做,你可以重新启动netlogon服务(我主要使用PowerShell,所以我将举一个例子)。

 Get-Service netlogon | restart-service nltest.exe /sc_verify:<fully.qualified.domain.name.here> 

在重新启动服务之后,我运行了nltest命令来validation安全通道是否恢复运行。

如果你做了一些networking更改(IP地址,更改硬件,虚拟化等等),你可能需要在运行上述命令之前刷新你的dnscaching并清空你的arp表。

 ipconfig /flushdns arp -d * Get-Service netlogon | restart-service nltest.exe /sc_verify:<fully.qualified.domain.name.here> 

更新了新版本的PowerShell

打开PowerShell AsAdministrator

 Test-ComputerSecureChannel -Verbose 

如果False则运行:

 Test-ComputerSecureChannel -Repair -Server PDCEmulatorName -Verbose 

如果修复,您将看到消息,如果失败,则尝试添加凭证

 Test-ComputerSecureChannel -Repair -Server PDCEmulatorName -Credential Domain\UserName -Verbose