Auto-Repair Tool

How to schedule Powershell script to run in task scheduler

Yes, you can easily schedule .bat scripts, but how about scheduling a PowerShell script to run via the Windows task scheduler? Let’s do that quickly.

schedule powershell script

1. Step Before you can run your own Powershell scripts you to run the Powershell as administrator and change the Execution Policy. We have prepared a tutorial for you. Read this: Powershell script cannot be loaded because the execution of scripts is disabled on this system

Basically, run as admin and enter Set-ExecutionPolicy RemoteSigned

Saving PowerShell Script as .PS1 File

2. Step Now copy your Powershell script into a text file and save it as a .ps1 file – If you are new to Powershell, you might want to read our tutorial How to save powershell scripts

Powershell script in text file

3. Step Click on File, Save as

4. Step When you save the file enter a name and add “.ps1″, from the dropdown select “All files” (important step)

Powershell script in text file


Creating Batch Script To Schedule Powershell script

5. StepOpen the notepad and insert:

powershell -command C:\path\script.ps1
Replace C:\path with your own path

6. Step Save the file as a .bat file similar to step 4 but add “.bat”
How to save batch script in Windows 7

7. Open the Windows task schedule and schedule the .bat file


8. StepIf you don’t know how to schedule bat files in Windows 7, read our tutorial how to schedule tasks in Windows 7

Open the task scheduler and add the bat file (Actions)
Schedule Powershell script via task scheduler

Alternative Solutions: Auto-Repair Your PC And Drivers

Still Having Trouble? Try TWEAKBIT FIXMYPC - FREE

Published: Monday, August 22nd, 2011 Last Modified: April 13, 2015

Related Posts

Rate This Article
5 of 5 0 (100%) 1 vote