Scripting Blog

A place to learn about PowerShell and share stories of automation

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

Hey, Scripting Guy! How can I display the IP addresses associated with a given MAC address?-- NK 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 using that address?” ...

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

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 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 we’re also going to show you ...

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

Hey, Scripting Guy! I have a series of strings that look something like this: xxxxyyyyyyxx. How can I extract just the y’s?-- JB 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 home and spend the weekend watching...

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

Hey, Scripting Guy! How can I tell which users are connected to a print queue?-- RE 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 and see who’s in there ...

Feedback usabilla icon