Scripting Blog [archived]

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

PowerTip: Use PowerShell to Determine if a Laptop Is Running on Battery

Summary: Learn how to use Windows PowerShell to determine if a laptop is running on battery. (image)  How can I use Windows PowerShell to determine if my laptop is running on battery? (image) Use the Win32_Battery WMI class and look for a BatteryStatus of 1—this means the battery is discharging (in use). Here is an ...

Dortmund, Geneva, Zurich

Summary: Our trip now takes us from the Netherlands to Dortmund to Geneva and then on to Zurich. Well, the Scripting Wife and I had a wonderful time at the first-ever Dutch PowerShell user group. I delivered two presentations and made dozens of new contacts and friends. The following day, Jeff Wouters took Teresa and me out and showed us ...

Use PowerShell to Detect Power State and to Set Power Plan

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to detect the power state on his laptop and to set the appropriate power plan. Microsoft Scripting Guy, Ed Wilson, is here. This evening in Oslo, Norway, the Scripting Wife and I are attending the Microsoft Technology User Group meeting. The meeting runs from 18:...

Use PowerShell and WMI or CIM to View and to Set Power Plans

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to use Windows PowerShell and WMI or CIM cmdlets to view and to set power plans on his laptop. Microsoft Scripting Guy, Ed Wilson, is here. Tomorrow, the Scripting Wife and I are at the Microsoft Technology User Group in Oslo, Norway. I will be talking about using Windows PowerShell 3...