การสั่งให้ Task Scheduler รันสคลิปหรือโปรแกรมที่เป็นไฟล์ PowerShell โดยตรงจะทำไม่ได้ เนื่องเป็นเรื่องของความปลอดที่ทาง Microsoft ตั้งไว้ ไม่เหมือนกัน Command Prompt หรือ cmd ดังนั้นการที่จะสั่งให้ Task Scheduler รันสคลิป จะต้องส่งผ่านตัว Parameter พร้อมกำหนด Execution Policy ให้กับไฟล์สลิปนั้นด้วย

ตั้งค่าให้ Task Scheduler รัน PowerShell Script
ข้ามมาตรง Action Tab กำหนดในส่วนของ Action ตามนี้
- Action: Start a program
- Program/script: PowerShell หรือ C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- Add argument (optional): -ExecutionPolicy Bypass -File “พาธของไฟล์สคลิป”
Document PowerShell: https://docs.microsoft.com/en-us/powershell/