For those of you not familiar with the Windows Task Scheduler, it allows you to run programs (tasks) based on a at a certain time (schedule) … task scheduler … get it? You’ll find it in the Control Panel, under Administrative Tools.
If you want to create a task that runs a PowerShell script:
- Open Task Scheduler
- Click the Action menu and Create Basic Task.
- Follow the wizard to give your task a name and set a basic schedule (you can get more granular with the schedule later).
- Under Action, choose Start a program and click Next.
- Enter “%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe” under Program/Script and enter the path to your script (i.e. “C:\Scripts\MyScript.ps1”) under Add Arguments.
- Finish the wizard, selecting Open the Properties dialog, if you want to customize the schedule or other information about the task.