powershell - Task Scheduler Task Completes Script Does not Run -
i have simple powershell job copies file computer network folder. have verified able run when manually triggered, not through task scheduler. when triggering task scheduler history indicated has run both "action completed" , "task completed".
copy c:\test.txt "\\network\folder\destination\" /z /y
on job itself:
action:
-program/script: c:\windows\system32\windowspowershell\v1.0\powershell.exe
-arguments: -file "c:\users\me\desktop\move.ps1"
its allowed run on demand, running through user access network folder, highest privileges. trouble shooting ideas appreciated.
you're trying call cmd function powershell has copy
aliased copy-item
cmdlet default. you'd need modify script call cmd
if want keep line is.
& cmd /c copy c:\test.txt \\network\folder\destination /z /y
Comments
Post a Comment