as the title says, how do you run a script on task scheduler when RAM usage is greater than 3gb? I want to run a script that changes the power plan (already done).
My only problem is do I configure task scheduler to read RAM usage
Thanks!!
EDIT: I'm experimenting on this
while($true) {
$ram = 0
$ram = wmic OS get FreePhysicalMemory
if ($ram -ge 12000000) {
powercfg /s 9897998c-92de-4669-853f-b7cd3ecb2790
write-host("AMD balanced")
}
elseif ($ram -le 12000000){
powercfg /s a1841308-3541-4fab-bc81-f71556f20b4a
write-host("power saver")
}
write-host($ram)
}