Upload file to SFTP using PowerShell

前端 未结 4 1222
心在旅途
心在旅途 2020-12-12 20:48

We were asked to set up an automated upload from one of our servers to an SFTP site. There will be a file that is exported from a database to a filer every Monday morning an

4条回答
  •  有刺的猬
    2020-12-12 21:41

    Using PuTTY's pscp.exe (which I have in an $env:path directory):

    pscp -sftp -pw passwd c:\filedump\* user@host:/Outbox/
    mv c:\filedump\* c:\backup\*
    

提交回复
热议问题