Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Wndows Task Scheduler Not Executing PS Script

$
0
0

Hi I have a script which reads files from a network path and uploads to sharepoint library and then moves to another archive folder.

It works fine if I run it manually

When I schedule it, in the task scheduler it says running and then after sometime ready state with (0x1) as code

When I schedule from task scheduler, I have a service account with admin privileges over the network path.

I have given these paramters

Start Program : Powershell

Add arguments : -executionpolicy bypass -Command & {"\\server1\data02\spscandocs\spupload.ps1"}

Start in : \\server1\data02\spscandocs

Any idea what I m doing wrong here

S




Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>