Quantcast
Channel: myspworld » Operations
Viewing all articles
Browse latest Browse all 10

How to Schedule a Powershell Script to Run on Windows 2008

$
0
0

It is a little bit tricky to configure a Powershell  script to run on the task scheduler on Windows 2008.

The separation between the powershell.exe command and the arguments makes a little confusion.

The way I did it was:

  • Create a new task.
  • Define a schedule.
  • Add an action:
    • Program/script: Powershell
    • Add arguments: -command &{E:\scripts\ClearIISLogs.ps1}

Now you just need to run your script and make sure it works as expected.

 

See you,

Amadeu.



Viewing all articles
Browse latest Browse all 10

Trending Articles