Scheduled Powershell Script not working
I have a scheduled powershell script that saves some files on the c:\temp folder and then copies it to another directory after the script completes. the script works fine if I run it manually from PowerGui. if I run the scheduled task, which
runs under another administrative account, the files do not get created in the directories. I have the task also running "Highest privileges". any suggestion on how to troubleshoot this or what may be causing this permissions problem to the folder?
Thank you
LLornzo Gonzalez
June 11th, 2010 9:46pm
Are you getting any error message?
Do you have any error messages in the event log?
Please paste the powershell script details here.
Also, try to run the script under admin account.
Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX http://blogs.sivarajan.com/ http://publications.sivarajan.com/ This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2010 6:24am
Hello,
did you enable powershell for remote execution, to allow the system to run Powershell scripts that are created on the local machine:
set-executionpolicy RemoteSigned
Then create .bat or .cmd file with the content:
powershell.exe -command "& 'MyScript.ps1' "
and configure it as scheduled task as you know.
Also see this nioce video:
http://get-admin.com/blog/?p=4
Check out also:
http://blogs.technet.com/b/heyscriptingguy/archive/2009/03/30/how-can-i-create-a-scheduled-task-on-a-number-of-computers.aspxBest regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
June 13th, 2010 2:24am