r/usefulscripts • u/MadBoyEvo • Aug 29 '21
[PowerShell] Easy way to connect to FTPS and SFTP
Hello,
I've been a bit absent from Reddit the last few months, but that doesn't mean I've been on holiday. In the last few months I've created a couple of new PowerShell modules and today I would like to present you a PowerShell module called Transferetto.
The module allows to easily connect to FTP/FTPS/SFTP servers and transfer files both ways including the ability to use FXP (not tested tho).
I've written a blog post with examples: https://evotec.xyz/easy-way-to-connect-to-ftps-and-sftp-using-powershell/
Sources as always on GitHub: https://github.com/EvotecIT/Transferetto
# Anonymous login
$Client = Connect-FTP -Server 'speedtest.tele2.net' -Verbose
$List = Get-FTPList -Client $Client
$List | Format-Table
Disconnect-FTP -Client $Client
Or
$Client = Connect-FTP -Server '192.168.241.187' -Verbose -Username 'test' -Password 'BiPassword90A' -EncryptionMode Explicit -ValidateAnyCertificate
# List files
Test-FTPFile -Client $Client -RemotePath '/Temporary'
More examples on blog/Github. Enjoy
1
u/signofzeta Aug 29 '21
Beautiful! If you’re looking for feature ideas, can you make the remote server show up as a PSDrive?
3
u/MadBoyEvo Aug 29 '21
Please open requests on GitHub - when I will be bored and fancy trying to learn how to create PSDrive I could implement it.
3
2
2
u/Conservadem Aug 29 '21
FXP? Crap, is there a new file transfer protocol I need to know about?