Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Find Expiring Passwords?

(image) Hey, Scripting Guy! The pointy headed boss (PHB) is at it again. He has decided he does not like it when users do not change their password when prompted. As a result, he wants me to produce a report once a week of all the users who will have to change their password next week. Please tell me it can’t be done so I can get him off ...

Hey, Scripting Guy! How Can I Locate Missing Attributes in Active Directory Domain Services?

(image) Hey, Scripting Guy! Why do some guys seem to get away with anything at work? I mean just because they spend all their time drinking coffee with the boss does that mean they do not have to do any work? You say you need examples? Consider our Active Directory Domain Services (AD DS). The users that I create, the groups I create, and ...

Hey, Scripting Guy! How Can Retrieve a List of All My Computer Accounts, Grouped By OU?

(image) Hey, Scripting Guy! How can I get a list of all the computers in my domain, grouping those computers by the OU in which the computer account resides?-- TA(image) (image) (image) Hey, TA. Well, today is Monday, and the Scripting Guy who writes this column is actually glad it’s Monday. Not that he’s all that excited about coming ...

Hey, Scripting Guy! How Can I List the Members of a Domain Group That Belongs to the Local Administrators Group?

(image) Hey, Scripting Guy! I manage over 300 servers in our environment. For each server I need to determine the members of the local Administrators account. It’s easy to get a list of local users and domain users that belong to the Admin account; it’s also easy to get a list of any domain groups that belong to the Administrators ...

Hey, Scripting Guy! How Can I Get a List of Active Directory Groups That Have Just 1 Member or Fewer?

(image) Hey, Scripting Guy! We’re trying to straighten out our Active Directory, and in order to do so, I’ve been asked to come up with a list of all the groups that have just 1 member or fewer. How can I write a script that will return this information for me?-- DR (image) (image) (image) Hey, DR. Before we answer your question ...