How do I perform FTP uploads using PowerShell?”

by Mikael Henriksson 22. October 2010 22:51

It can be done pretty easily when you know how. The trick with PowerShell is to make good use of the power of .net framework. I just created a Github project called ps-ftp.  It’s pretty straight forward and since you can find the code there I’m just going to post an example usage.

$credential = new-object System.Net.NetworkCredential("username", "password")   
$url = "some.ftp.url.com"
$dir = D:\Project\Application\Release\WebClient
upload-directory -url $url -dir $dir -credential $credential

If you find any issues and what not please create an issue or even better fix it and do a pull-request.

Tags: ,

PowerShell | Continuous Delivery

blog comments powered by Disqus

About the author

Life architect specialized in programming

Month List

Widget Twitter not found.

Root element is missing.X