Quick Fix for computers no longer domain joined.

We’ve all been in the situation where we have signed on to a computer only to find that its security relationship with the domain has failed. In the past we’d have 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 that we might even forget why we sat down to sign on to the computer in the first place.

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 WINDOWSITPRO\Administrator –Repair

When signed on as a local administrator.

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

Discuss this Blog Entry 1

on Sep 17, 2013

Unfortunately, while the Test-ComputerSecureChannel cmdlet did exist in windows 7 and 2008R2, it didn't have the "Credential" parameter until it was updated in powershell v3 for Windows 8/2012. That severely limits it's usefulness.

Please or Register to post comments.

What's Hyperbole, Embellishment, and Systems Administration Blog?

IT pro Orin Thomas provides true tales, snafus, news, and urban legends for Microsoft Windows system administrators.

Contributors

Orin Thomas

Orin Thomas is a contributing editor for Windows IT Pro and a Windows Security MVP. He has authored or coauthored more than thirty books for Microsoft Press, founded the Melbourne System Center,...
Blog Archive

Sponsored Introduction Continue on to (or wait seconds) ×