I am trying to get Windows Task Scheduler to run a PowerShell script. I have a script file with the following code.
This script runs fine when I run it using the PowerShell program. I’ve tried to run it with Task Scheduler on Windows using the instructions in this article. How to run PowerShell scripts from Task Scheduler But I just get a blue window that closes quickly with red text that I can’t read before it closes. How do I run this script from Task Scheduler?