1

Below is the powershell script to copy files to to our FTP folder, now encryption has changed to 'Use Explicit FTP Over TLS', how do I modify script with encryption added to it. this script used to work before encryption added.

$FTPHost = "ftp://ftp.com"
$FTPUser = "xxxxx"
$FTPPass = "xxxxxx"
$source = "C:\Test"

$webClient = New-Object System.Net.WebClient
$webClient.Credentials = New-Object System.Net.NetworkCredential($FTPUser, $FTPPass)

$files = get-childitem $source -recurse -force

foreach ($file in $files) {
    Write-Host "Uploading $file"
    $webClient.UploadFile("$FTPHost" + "/" + $file.Name, "STOR", $file.FullName)
}

$webClient.Dispose()
0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.