Lessons In PowerShell - Running a PowerShell Script Via Windows Task Scheduler

   Submit to Reddit      
  

In order to run a Windows PowerShell script through the Windows Task Scheduler:

  • Run the Task Scheduler:

    Start ➞ Control Panel ➞ Administrative Tools ➞ Task Scheduler

  • Create and schedule a task that starts a program.

    Specify the program to run as:

    C:\WINDOWS\system32\WindowsPowerShell\v1.0\Powershell.exe
    

    Specify the arguments as:

    C:\PathToMyScript\MyScript.ps1
    

The PowerShell script will now run as scheduled.



comments powered by Disqus