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 http://en.wikipedia.org/wiki/Secure_Shell 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
The command downloads the Posh-SSH module from the public PowerShell Gallery. Once you approve the download, here are your new commands:
Also, check out the author’s extensive article on how to use these commands.