To run a PowerShell script using a scheduled task in Windows, you must set the Action to run a Program and configure it as below:
1 Program / Script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
2 Add arguments (optional) : -file folder_and_file.ps1
![](https://rdr-it.io/wp-content/uploads/2018/12/tp-powershell-script-460x500.png)