Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, October 16, 2018 2:27 PM
Hi Guys,
I am trying to copy files from a Network location to a local folder using Powershell scripting. The very strange thing is, when I run this script via Powershell ISE it working fine. But when i run this script via Windows Task Scheduler from the same machine, it is unable to copy files. It is even unable to see the files in the network drive.
Eg: when i run this command via Windows Task-scheduler, i.e. $(ls $(Network_Location_Name) | Measure-Object -Property Length -Sum).Count | outfile FileName.log, the result is ZERO !
In addition, I made sure I am running the task with a service account which has full access to the Network location from where it is copying the files.
Please help and thanks in advance!
Regards
Mike
Mike
All replies (1)
Wednesday, October 17, 2018 9:32 AM
Hi Mike,
Check the information in the link below if they are helpful.
Powershell script to copy file to network runs manually, but not from Task Scheduler
Running powershell script through Windows Task Scheduler
https://superuser.com/questions/629472/running-powershell-script-through-windows-task-scheduler
Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Hope it could be helpful
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].