Scripting Blog [archived]

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

How Can I Display the IP Addresses Associated with a Given MAC Address?

(image) Hey, Scripting Guy! How can I display the IP addresses associated with a given MAC address?-- NK(image) (image) (image) Hey, NK. Before we answer your question we should take a moment to answer a related question. People often ask us, “If I have a MAC address can I write a script that will tell me which computer on my network is ...

How Can I Add a User to a Group, but Only if that User is a Member of the IT Department?

(image) Hey, Scripting Guy! How can I add a user to a group, but only if that user is a member of the IT department?-- JV(image) (image) (image) Hey, JV. You know, this is your lucky day: not only are we going to show you how you can add a specified user to a group (assuming, of course, that this user is a member of the IT department), but...

How Can I Extract a Series of Characters Found in the Middle of a String?

(image) Hey, Scripting Guy! I have a series of strings that look something like this: xxxxyyyyyyxx. How can I extract just the y’s?-- JB(image) (image) (image) Hey, JB. And, yes, it is a Friday. But, hey, it’s just a coincidence that we happened to pick an easy question on a Friday, the day we’re itching to get out of here and go ...

How Can I Tell Which Users are Connected to a Print Queue?

(image) Hey, Scripting Guy! How can I tell which users are connected to a print queue?-- RE(image) (image) (image) Hey, RE. You know, if your printers are anything like the ones the Scripting Guys are used to working with then it’s easy to tell which users are connected to a print queue: all you have to do is walk into the printer room ...