Thank you, Powershell

By | January 13, 2017

This will be my first Powershell post and it’s a doozy. I’m still coming down from the adrenaline high that comes from realizing that systems are down and the clock is ticking.

It all began when I saw an email on my phone about a user not being able to connect to his mapped drives. It’s Friday, I woke up in a good mood, and I scoffed at the email and thought “I’ll have it fixed in 5 minutes.” Little did I know that no one would be able to connect to their mapped drives this morning. So I get into the office and first thing I start doing is testing network connectivity. Can I reach the server by IP? Yes. Can I reach it by it’s name? Yes. What gives!? Can I navigate to it through windows explorer?! YES?! What is going on here? This isn’t going to be a five minute fix at all! Or is it?

Test-ComputerSecureChannel

The Test-ComputerSecureChannel cmdlet verifies that the channel between the local computer and its domain is working correctly by checking the status of its trust relationships. If a connection fails, you can use the Repair parameter to try to restore it.

This Cmdlet was how I was able to identify where the problem was. If you were paying attention, though, this wasn’t related to a single user, but everyone! After a bunch of different checks and theories I ran the cmdlet on my file server and sure enough, it came back false. By this time I was exhausted from jumping to crazy conclusions (Domain controller authentication being shot something is corrupted somehow, somewhere.) and it was lunch time for my userbase. I rebooted the server and everything was fine.

Deciding to learn Powershell continues to prove incredibly useful and I’m glad I’m doing it. In my next posts I’ll be more technical, but I was having trouble deciding how I’d start. I figured an example of me freaking out and identifying my problem with Powershell was as good a start as any.