Scripting Blog [archived]

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

How Can I Retrieve Information Required by the Sarbanes-Oxley Act?

(image) Hey, Scripting Guy! As part of our Sarbanes-Oxley requirements I need to get a list of all my Active Directory users, along with the date that their account was created and the last time their password was changed. How can I get a list like that?-- DB(image) (image) (image) Hey, DB. You know, this past weekend the Scripting Guy who...

How Can I Move a Computer From an Unknown OU into a Known OU?

(image) Hey, Scripting Guy! How can I move a computer from an unknown OU into a known OU?-- DB(image) (image) (image) Hey, DB. You know, a lot of people take a look at system administration scripting and think, “Well, it might be useful, but it sounds kind of boring.” After all, clearing event logs and changing user passwords are ...

How Can I Use a Script to Create a Sequential Series of User Accounts?

(image) Hey, Scripting Guy! For purposes of testing, I often need to create multiple user accounts like this: pgeorge01, pgeorge02, etc. How can I write a script that automatically creates the next account in the sequence; that is, pgeorge03?-- RG(image) (image) (image) Hey, RG. You know, after our last experiment went horribly, horribly ...

How Can I Get a List of All the Users Who Have an Alternate Recipient?

(image) Hey, Scripting Guy! How can I get a list of all the users who have an alternate recipient (altRecipient)?-- SA(image) (image) (image) Hey, SA. You know, one of the great things about being a Scripting Guy is that we don’t ever have to know what we’re talking about; all we do have to know is how to write a script that does ...

How Can I Count the Number of Computers in a Domain?

(image) Hey, Scripting Guy! How can I count the number of computers in a domain?-- TN(image) (image) (image) Hey, TN. Here’s a true story for you. About 5 years ago, when one of the Scripting Guys first started at Microsoft, his group here (which might not be the most technically-savvy group at the company) needed to get a count of all ...