This question would seem a very common question but i have done every possible thing for the solution but nothing works for me. I m trying to run a powershell script via batch powershell.exe c:\Powershell\process.ps1 process.ps1 - where my powershell script is present. I have encountered a strange problem, when i schedule the task in the windows task scheduler, it shows the operations has completed successfully but but when i check the results, Nothing happned. "The script did not run at all"
when i manually double click the batch, the script is running absolutely fine. My question is, when the script is running fine in batch manually, what could be the reasons of not running in task scheduler. Technically saying...the script is running in cmd.exe but not running on schedule (windows task scheduler 2008 server).
I tried checking each and every option in windows task scheduler, I operate task scheduler since ages. I am completely blank to understand the further troubleshooting steps. pls help
Is this any use?
Creating a Scheduled task to run a PowerShell script
http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx
In summary : in the Start a Program pane's Program/script box
powershell -file "path\and\script\filename.ps1"