Forum Discussion
Powershell runs fine manually but not in Task Scheduler
I have a strange problem, and I am hoping someone will be able to point me to a solution.
Below you will see a PowerShell script below that I am running
The script works fine when it is run manually in PowerShell, but when I put it in the Windows Task Scheduler and it runs at the appointed time (5 am) the output is garbage
You can see the script running below at 5am
If it Right click on the task in the scheduler, and tell it to run, the script it runs normally and the output is fine
I am guessing there is some switch or something that I am missing that will need to make this work, but I am hoping someone has an idea and can help me because I am lost
Thanks
Gary
1 Reply
- gastoneBrass Contributor
You can try to save your output file in c:\users\amber\documents remove the network mapping
Post your transcript e and the garbage output