I have searched and read a lot about downloading SSL FTP files in PowerShell... But how do I upload them? I have a filename I need to upload each day and I get errors that I am not logged in. I'm currently uploading to other FTP sites like this:
$Filename = "myfile.txt"
$FullPath = "\\server\share\$Filename"
$ftp = "ftp://user:pass@ftp.domain.com/$Filename"
$ftpWebClient = New-Object System.Net.WebClient
$ULuri= New-Object System.URI($ftp)
$ftpWebClient.UploadFile($ULuri, $FullPath)
Do I need to create a whole new block of code for the SSL FTP upload, or do I just need to make minor adjustments to this code?
Thanks!