Scripting Blog [archived]

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

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 Read Computer Names From a Text File and Then Verify Whether or Not Those Computers Still Exist?

(image) Hey, Scripting Guy! How can I read a list of computer names from a text file, and then check to see if those computers still exist in Active Directory?-- CL(image) (image) (image) You know, that’s a good question, CL, we – hold on a second. Some of you out there look so sad; why the long faces? After all, the 2008 Winter ...

How Can I Prompt for a Computer Name and Then Delete That Computer Account From Active Directory?

(image) Hey, Scripting Guy! How can I write a script that prompts the user for a computer name, then goes out and deletes that computer account from Active Directory?-- PH (image) (image) (image) Hey, PH. As a general rule, technical writers never experience writer’s block. Why not? Well, writer’s block usually comes about because you ...

How Can I Use Windows PowerShell to Get a List of All My Computers?

(image) Using Windows PowerShell, how can I retrieve a list of all the computer accounts in my domain?-- TE(image) (image) (image) Hey, TE. You know, several years ago the Scripting Guy who writes this column was playing basketball with one of his brothers. Because there were a total of 5 people at the park they had to play 2-on-2, with one ...

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 ...