The Surly Admin

Father, husband, IT Pro, cancer survivor

Get the FQDN for your OU’s

As I have delved into Powershell more and more, I’ve noticed that a lot of the Microsoft cmdlet’s require the use of FQDN’s and finding that full name isn’t as easy as it really should be.  Typically I have to go into ADSI Edit, drill down the Active Directory tree and then go into the properties of the object I want and locate the cn property.  The FQDN I find myself needing most often is for my Organization Units (OU’s).  Here’s a little function I created to help me find that information quickly and painlessly–it even puts the information into the clipboard so you can paste it into your script with ease.  Read on, fearless readerer!

Continue reading


October 4, 2012 Posted by | PowerShell | , , , , | 4 Comments

Secure Credentials Function

This particular function rose out of another script I wrote a little while back, the Restart Computers with Firm Confirmation.  I wanted to make a particular piece of it available for others to use in their own scripts or at least something I can always refer to within my own.

Continue reading

October 3, 2012 Posted by | PowerShell | , , | 5 Comments