FTP

I have used PowerShell Code Repository - FTP upload with some success, however this is possibly an "old" solution and FtpWebRequest Class (System.Net) might be better. However both these are better than a 3rd party library, in my view.

What I do need to add is that I have had trouble with this approach. I did not get to the bottom of the issue, whether it was related to proxy, firewall, active/passive or something else. However the ftp command did work fine, so in the end I used this: Start-Process "ftp" -Wait -NoNewWindow -ArgumentList "-s:ftpcmd.txt", which worked fine. Whilst the ftp command is standard on Windows you will need an ftpcmd.txt file similar to this:

open localhost
ftpuser
password
verbose
binary
prompt
ls -l
lcd C:\Dev\PowerShell\Processing
mput *.txt
ls -l
close
quit
 
 
Hopefully that kind of makes sense, if not just look the commands up, they are fairly standard. Oh and yes the blank lines at the end are deliberate. Finally, you can use a different file name!