Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a powershell script that I want to run as a schedule job.

The script runs great when I execute it manually, but when I run the schedule task, the job fails with the message "could not start"

Schedule job setup:

Run: powershell -command "& 'ScriptName.ps1'" Start in: Run as:

This is scheduled on a Windows Server 2003 and is running powershell 1.

share|improve this question
what is the ampersand for? When I want to debug these, I configure the job to interact with the desktop and start a cmd shell. From there I run the command-line and fix things until it works. The idea being that you can sure permissions and config issues interactively first. – uSlackr Jun 15 '12 at 16:42
up vote 1 down vote accepted
  1. try to use the full path of ScriptName.ps1

  2. does the script depend on anything in your $Profile? if it does, it may not be loaded when you run as a schedule job, so make sure that you load the module or set up env variables needed.

share|improve this answer
when I tried using the full path, same error. – Scott Jun 19 '12 at 13:19
I ended up needing to use the full path fro both the script and powershell itself. Apparently powershell wasn't in PATH – Scott Jun 21 '12 at 15:37
@Scott can you please explain bit more in detail what you did. – Mowgli Mar 15 '13 at 19:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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