As powershell is running by default in secure mode , use the following setting to run powershell scripts from a scheduled task.
This way you do not have to elevate the rights for running scripts. Ensure your Powershell script is located in a folder where he is well protected from tempering bud accessible by the user the scheduled task is running under.
executable: Powershell.exe
Option: -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File <Path and Scriptname>
Example for Option :-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden –File C:\scripts\myscript.ps1