I have a Pscript for clearing and repopulating a Sharepoint 2010 list. It works fine when run manually. I set it to run as a scheduled task, and the history shows it as running successfully, but the content of the list doesn't appear to change. At least, the Modified Date for the list doesn't change.

Here's the command:

  powershell –file "C:\Pscripts\MyScript.ps1
  • Did you try to check off the script to run with highest privileges?
    – eirikb
    Commented Nov 21, 2014 at 6:50

2 Answers 2


Please ensure you are following the steps mentioned here for scheduling your task.

Looking at history of the scheduled task doesn't ensures that the powershell has executed successfully. Even if the powershell is returning an error, the scheduler history will show as "running successfuly".

  • This worked for me, I was trying to specify the full path to my script, but I needed to use it with the 'start in' option as described.
    – Melikoth
    Commented Apr 10, 2015 at 22:12
  • Its always a nice feeling to help out someone... :)
    – Amit Tyagi
    Commented Apr 11, 2015 at 0:20

This is what we use. Under the task options for Action choose "Start a program".



Add Arguments:

-command "& 'C:\Pscripts\MyScript.ps1'"

You could also try to log something in your script so that you can see if it is being run or failing etc.

I use this function to Log stuff being run via the task manager.

function Log($msg)
    $msg | Out-File $TranscriptFileName -Append

Log "Starting Powershell Script"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.