I created a batch file that executes a PowerShell command. This should read out the capacity of the notebook battery. How can the result of the command be defined as a variable?
Something with tokens is needed for that, right? Can someone help me? In the end, CMDs/Natchs "echo" should output the result.
powershell -Executionpolicy Bypass -Command "(Get-WmiObject -Class "BatteryFullChargedCapacity" -Namespace "ROOT\WMI").FullChargedCapacity"