Scripting Blog [archived]

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

Find Active Power Plan on Remote Servers by Using PowerShell

Summary: Find the active power plan on remote servers by using Windows PowerShell and WMI information. The Microsoft Scripting Guys show you how to do it.   (image) Hey, Scripting Guy! I have a real problem. It seems that both Windows 7 and Windows Server 2008 R2 install with the “balanced” power plan. A balanced power plan ...

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 ...