Windows task using domain account results in user profile error event id 1511
I think you can do this with only a single action rather than three.
Program/script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Add argumments (optional): -ExecutionPolicy Bypass -NoProfile -File MyScript.ps1
Start in (optional): path where myscript.ps1 sits