Exchange PowerShell in a Scheduled Task runs forever

You either need to modify your execution policy, or specify the -ExecutionPolicy Bypass as a commandline parameter.

powershell -Command "<path to .ps1 script>" -ExecutionPolicy Bypass

Not sure if this is how you are doing it, but when I am running PowerShell scripts via task scheduler I use the "Start a program" action and select powershell and then add the arguments from there. That might be what you are doing here, but it's kind of unclear. Here's a screenshot: enter image description here

Per TheCompWiz execution policy might also be an issue.