Answered
Feature Request: Power Status
I could really use the ability to determine if a computer is on AC power or battery. This way I could avoid pushing certain updates to machines that are on battery.
0
Comments
I've seen some articles on WMI queries for battery. They may be, technically, "unsupported" queries. Take a look at https://devblogs.microsoft.com/scripting/using-windows-powershell-to-determine-if-a-laptop-is-on-battery-power/
Very interesting. You can use WMI to get the BatteryStatus=1 (but some laptops may discharge even when plugged in). The article recommends using PowerOnline instead, but it's unsupported. See how those work. Hopefully that gets you in the right direction.
Just use the code above as the first step of your deployment and set the Error Mode (under Options) to "Stope Deployment with Error"