Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Determine the OU the Local Computer Belongs To?

(image) Hey, Scripting Guy! In a logon script, which attribute do I use to determine the OU that the local computer belongs to?-- JP(image) (image) (image) Hey, JP. Most people are familiar with Cupid, the Roman god of love. In fact, you’d be hard-pressed to find anyone who doesn’t know that Cupid carries with him a quiver of gold-tipped...

How Can I List All the Sub-OUs in an OU?

(image) Hey, Scripting Guy! How can I list all the sub-OUs in an OU? That includes any OUs that might be in those sub-OUs.-- JE(image) (image) (image) Hey, JE. If you’re the least bit familiar with this column then you know that we Scripting Guys love to answer questions that involve searching Active Directory. That’s because we never ...

How Can I Determine if an OU is Blocking Group Policy Inheritance?

(image) Hey, Scripting Guy! How can I determine if an OU has the Group Policy property Block Policy Inheritance box checked?-- PP(image) (image) (image) Hey, PP. You know, sometimes you wait all your life for a situation to arise, and then it never arises. For example, one of the Scripting Guys happens to know all nine verses to the song ...