开发者

PowerShell Copy on a mapped or UNC Drive (SQL Server Job Agent)

What am I doing wrong?

As a step in a Job I am trying开发者_如何学C to overwrite file by copying the drive is mapped, but I am using unc path just in case.

In PowerShell this works in the command line interface.

Copy \V240\folder\foo.txt \V240\folder\bar.txt

1

When I put it in a Job Agent in SQL Server with the PowerShell option it says successfully completed but the file has not been copied.


The Powershell SQL Agent job step starts Powershell sqlps host in the SQL Server provider. I would try setting location (cd) to the filesystem provider before copying

set-location c:\
Copy \V240\folder\foo.txt \V240\folder\bar.txt
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜