Scripting Blog [archived]

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

Hey, Scripting Guy! Can I Use WMI to Determine When Someone Logs Off a User or Shuts Down a Server?

(image)   (image) Hey, Scripting Guy! I have a Windows Server 2003 computer that I need to monitor for reboots. This may sound rather strange, but this server is more of a workstation, and we have a user mode application that runs under an actual user account. Therefore, we log on using the ID we have set up, launch the application, ...

Hey, Scripting Guy! How Can I Retrieve Information About Laptops Changing from Full Power to Minimal Power Usage?

(image)   (image) Hey, Scripting Guy! I have a number of users on our network that use laptops as their primary workstation. These users are constantly complaining that their screen goes dark on them, or that the computer is running slow. I think the problem is the laptops switching between battery and AC power, or maybe the computer ...

Hey, Scripting Guy! How Can I Be Notified When a USB Drive Is Plugged into My Computer?

(image)   (image) Hey, Scripting Guy! I would like to be notified when I plug in a USB drive into my computer. I have some cool ideas for using that, but I do not know how to detect when a USB drive is plugged in. I know I can run a script that loops through looking for all drives, and compares them with a previous collection of drives ...

Hey, Scripting Guy! Can I Use Windows PowerShell to Lower the Priority of a Process?

(image)    (image) Hey, Scripting Guy! I have a problem with a rather annoying program at work. The program starts up and runs with high priority. When it does this, my computer is slow as a snail, and as unresponsive as a bear hibernating in the winter. I would like to use Windows PowerShell to lower the priority of this process. ...

Hey, Scripting Guy! Weekend Scripter: The Scripting Wife Redirects Output and Creates a Text File

(image)  Microsoft Scripting Guy Ed Wilson here. I love it when it rains. It sings of cleansing, freshness, new birth, and endless possibilities. Especially when it is a gentle spring rain like we are enjoying right now. It reminds me of when the Scripting Wife and I first went to Maui, Hawaii. We were staying near the beach, and every ...