Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Compare the Memberships of Two Groups?

Hey, Scripting Guy! I’m looking for a script that can get the memberships of two different groups, compare them, and then write out the differences. Can you help?-- LS Hey, LS. When we received your question a week or so ago we thought, “That’s a good question. Let’s put it on the list and answer it sometime.” Since then we’ve...
Comments are closed.0 0

How Can I Tell Which Service Packs Have Been Installed on a Computer?

Hey, Scripting Guy! How can I tell which service packs have been installed on my computers?-- FR Hey, FR. That’s a very good question; as you know better than we do, in this day and age it’s really important to make sure all your computers have the latest service pack, the latest hot fixes, and the latest downloads from Windows Update...
Comments are closed.0 0

How Can I Get a List of the Devices That Aren’t Working?

Hey, Scripting Guy! In Device Manager, any time a device isn’t working that device is marked with a yellow exclamation mark. How can I use a script to get a list of the devices that aren’t working? -- OL Hey, OL. Sometimes in baseball a batter absolutely hammers one, but the ball takes a lucky bounce and lands right in your ...
Comments are closed.0 0

How Can I Terminate a Process with a Specific PID?

Hey, Scripting Guy! If I have the PID, is there a way to kill a process using a script?-- JV Hey, JV. You bet there is. For those of you who aren’t familiar with the acronym, PID is short for Process Identifier, a unique ID number assigned to a process when it gets created. (Well, temporarily unique: as soon as the process is destroyed...
Comments are closed.0 0

How Can I Get a List of Exchange Servers Assigned to My Users?

Hey, Scripting Guy! How do I get a list of the Exchange servers (msExchHomeServerName) assigned to the users in an OU?-- BG Hey, BG. As you probably already figured out, you have two issues: you need to get a list of all the users in an OU, and then you need to figure out which Exchange server they’ve been assigned. Believe it or not, this ...

Feedback usabilla icon