I would like to make a probe that will execute the following powershell script on a networked computer in order to check for AC power loss on a laptop, but I am unsure how to get this to work. Any help would be appreciated.
(Get-WmiObject -Class BatteryStatus -Namespace root\wmi -ComputerName $Computername).PowerOnLine