How To Send Files Using WinSCP And SFTP And PowerShell

WinSCP is used widely within the IT community to send and receive files, it can be run from the GUI or from the command line. Did you know that it also has a .NET assembly that can be called from within a powershell script, module, or function? In this Snip, Nick will show you how to use this assembly to build a script that will enable you to send files using sftp, applying logic in how we pick up files ready to send and then sending those files using a combination of user name and password, followed by increasing the level of security by using a ssh keypair for authentication.

Prerequisites include: A Copy of WinSCP or the WinSCP Automation Kit

https://winscp.net/eng/download.php