3
1
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.
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 – 2012-06-15T16:42:47.090