Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

move files not working using Powershell in SQL Agent Job

$
0
0
I have this simple move files command that works fine in powershell prompt. However, if I schedule a SQL Agent job (on SQL Server 2014), the job fails to copy the files (the job itself did completed, not failed). The message is "Cannot move the item because the source and destination paths did not resolve to the same provider". I am pretty sure the job has the correct credential that can write to the remote path and I use "PowerShell" as the job type. move-item c:\temp\*.txt "\\www.abc.com\daily report"Any ideas? Thanks.

Viewing all articles
Browse latest Browse all 467

Trending Articles