Run a ps1 script after Windows Sleep and wake

In task scheduler , system , power-troublershooter , event ID = 1
action = powershell.exe
argument =
-ExecutionPolicy Bypass -File “C:\Users\PC\Google Drive\PowerShell Scripts\restart avantree after sleep .ps1”

set Run in highest priviliage in General

done

see photo

Leave a Reply

Your email address will not be published.