Press "Enter" to skip to content

Scheduled task run a PowerShell script


To run a PowerShell script using a scheduled task in Windows, you must set the Action to run a Program and configure it as below:

1 Program / Script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
2 Add arguments (optional) : -file folder_and_file.ps1

Related Posts

Administer Windows Remote Server in PowerShell with PSSession
Introduction In this tutorial, we will see how to remotely administer a Windows server in PowerShell (Powershell remoting) with PSSession. PSSession is the prefix of several Powershell commands that allow connection and management of it. All the comm

MDT: Running a PowerShell Script During a Deployment
In this article, I explain how to run a PowerShell script (ps1 file) during a deployment with MDT. Copy the ps1 << 1 >> file to the Scripts folder in the folder. Open the properties of the sequence and add a task of type Run Command Line

Leave a Reply

Your email address will not be published. Required fields are marked *

It looks like you're using an adblocker.
We use ads to keep our content free. Please support us by turning off your adblocker.