Tag: join domain

Rejoin a computer to domain without restart

We have been in the situation where we find that the Windows Server has its security relationship with the domain failed. In the past we had to remove the computer from the domain and then join it back again to reestablish the relationship.

This involved two reboots (one to leave, one to join). If it was a server that took a while to boot, the process could take so long.

However, I recently came across an article today which mention a PowerShell command to rejoin a computer to the domain without restarting it

Test-ComputerSecureChannel is one of those cool little PowerShell cmdlets that doesn’t get the recognition it deserves. Running the cmdlet by itself checks whether the relationship with the domain controller is still good. If it comes back True then everything is okay. If it comes back False then the relationship needs to be fixed.

Using Test-ComputerSecureChannel with the –credential –Repair options allows you to repair the relationship with the domain without any restarts. You run the command, sign out and then can sign in with your domain credentials. For example, to repair the relationship with the WINDOWSITPRO domain, issue the command:

Test-ComputerSecureChannel –credential domain\Administrator –Repair

When signed on as a local administrator.

Test-ComputerSecureChannel has been around since Windows Server 2008 R2.

Filed under: Windows(2003/2008/2012)Tagged with: , , , , , ,