Sftp file transfer using powershell in windows

51 Views Asked by At

I am trying to automate the process of downloading logs from my host server to local using sftp connection and powershell script. Can anyone help me how to create the executable file non interactive.

I tried this but didn't work,

sftp [email protected]

password  (this is invisible)

cd file path

get sample.log

exit

While running this, it gets stopped at password like to manually enter it. How can i pass it in the file and make it non interactive?

0

There are 0 best solutions below