Windows Server 2012R2 PowerShell with Parameters Scheduled Task

More and more PowerSell script are being used for routine task. However, when it come to use the Windows task scheduler it is not obvious how to set up a task running a PowerShell script, particular if that script requires parameters as an input.

To make this work you have to specify PowerShell under the action settings and the parameters are past in with a -command prefix via the Argument input box. Below shows an example. This essentially puts together the command line that will be execute.

ps_scheduled

 

Leave a Reply

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