How to schedule PowerShell scripts using Windows Tasks

Share this:

Hi Folks,

Last week I blogged here about PowerShell v3 and a new feature that is going to do the content of topic automatically however if you don’t have Windows 8/PowerShell 3 and you want to configure a script that you created to run on Windows Server 2008 R2 these following steps can be used:

If your script is not digitally signed, you can run the Set-ExecutionPolicy –ExecutionPolicy Unrestricted as shown in the figure below.


Now, it’s time to create a new Windows Task and what really matters for us is the Start a Program section, and these following values must be entered:

  • Program/Script field:
  • Add arguments (optional) field
    -NoLogo -NonInteractive -File C:pathyourscript.ps1

All pieces together are shown in the picture below.


That’s all my friends, from now your PowerShell scripts will work just fine. I do recommend to do a test and depending of the script you may want to configure a specific account to run on the Task and also to configure the script to

Anderson Patricio (Portuguese)
Twitter: @apatricio

Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at, and (Portuguese).