Executing a simple Powershell command using SQL job

  • I am trying to delete sql backup files under UNC path from one server to another server. I am getting an error message - An object at the specified path \\PRPWD01V0131\L$\SQLBackup\Archive does not exist

    Script -

    remove-item "\\PRPWD01V0131\L$\SQLBackup\Archive\*" -include *.bak -recurse

    I believe it's UNC path issue with credentials. Any help is appreciated!!

    Thanks!

  • Duplicate post. Replies here please: http://www.sqlservercentral.com/Forums/FindPost1699207.aspx

    -- Gianluca Sartori

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply