Managing FTP/SFTP/SSH using PowerShell on Windows 10

There are no built-in cmdlets in PowerShell designed for managing FTP but you can easily download and install a free module to fill the gap if ever needed.

Posh-SSH is a PowerShell 3.0 or newer module for automating tasks against systems using the SSH protocol. The module supports only a subset of the capabilities that the different SSH RFCs define but it allows for:

  • Establish SSH and SFTP sessions using credentials or OpenSSH keys.
  • Connecting through SOCKS and HTTP proxies for both SSH and SFTP sessions.
  • Execution of commands in a remote host using SSH Exec command.
  • Uploading and downloading of files using SCP and SFTP.

The module is hosted on GitHub. All source code for the cmdlets and for the module is available there and licensed under the BSD 3-Clause License. The module requires PowerShell 3.0 and .NET Framework 4.0. To install, run

Install-Module -Name Posh-SSH -Scope CurrentUser

Windows PowerShell 2018 02 01 15 47 08 600x208 - Managing FTP/SFTP/SSH using PowerShell on Windows 10

The command downloads the Posh-SSH module from the public PowerShell Gallery. Once you approve the download, here are your new commands:

Windows PowerShell Posh SSH Cmdlets 600x511 - Managing FTP/SFTP/SSH using PowerShell on Windows 10

Also, check out the author’s extensive article on how to use these commands.

Leave a Reply

Your email address will not be published. Required fields are marked *