Scripting Blog [archived]

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

How Can I Tell if Any Internet Explorer Windows Are Open to a Particular Web Site?

(image) Hey, Scripting Guy! How can I determine if I have any Internet Explorer windows open to a particular Web site?-- N(image) (image) (image) Hey, N. Before we begin the Scripting Guys would like to state, for the record, that we have never tried to obtain each other’s phone records nor have we ever even considered listening in on ...

How Can I Get a List of All the Databases on a SQL Server Computer?

(image) Hey, Scripting Guy! How can I get a list of all the databases on a SQL Server computer?-- ER(image) (image) (image) Hey, ER. Before we answer your question, we’d like to take a moment to offer our opinions on all the major – and controversial – issues of the day. We can do that because the Scripting Editor is on vacation and...

How Can I Delete All the Users in an Active Directory Group?

(image) Hey, Scripting Guy! How can I delete all the users in an Active Directory group?-- AA(image) (image) (image) Hey, AA. You know, that’s something we Scripting Guys never thought about: a script that could eliminate all the users in a particular group. The only problem we have with that is: where do we start? For example, maybe we ...

How Can I Identify the Last File in a Sequential List of Files?

(image) Hey, Scripting Guy! I have a folder which contains thousands of files, all numbered sequentially. How can I tell which file is the last file in the list?-- AC(image) (image) (image) Hey, AC. You know, one of the fun things about being a Scripting Guy is that we get to spend a lot of time shattering myths. For example, when we first...

How Can I Delete Just the Last Line of a Text File?

(image) Hey, Scripting Guy! How can I delete just the last line of a text file?-- AD(image) (image) (image) Hey, AD. You know, it’s been a long, hard day here at Microsoft, one of those days when everyone and everything seems to be against you. Many people, when faced with a day like today, turn to the so-called comfort foods: meatloaf, ...