Hi,
it took Long, but now, I decided to cut one more VBScript off, and start implementing a Powershell Script to upload the CRL to my CRL Distribtion Point with FTPS, so I took the Script from my collegue (http://www.thomasmaurer.ch/2010/11/powershell-ftp-upload-and-download/), and made some “improvements”:
#Declare the folder
$Dir="\\yourserver\servershare\"
#ftp server
$ftpserver = "ftp://yourftpserver/folder"
$user = "username"
$pass = "corresponding password"
foreach($item in (Get-ChildItem $Dir -Include "*.crl","*.crt","*.cer")){
"Uploading $item..."
#connect to ftp server
$ftp = [System.Net.FtpWebRequest]::Create($ftpserver+$item.Name)
$ftp = [System.Net.FtpWebRequest]$ftp
$ftp.Method = [System.Net.WebRequestMethods+Ftp]::UploadFile
$ftp.Credentials = new-object System.Net.NetworkCredential($user,$pass)
$ftp.UseBinary = $true
$ftp.EnableSsl = $true
#$ftp.UsePassive = $false
# read in the file to upload as a byte array
$content = [System.IO.File]::ReadAllBytes($item.FullName)
$ftp.ContentLength = $content.Length
# get the request stream, and write the bytes into it
$rs = $ftp.GetRequestStream()
$rs.Write($content, 0, $content.Length)
# be sure to clean up after ourselves
$rs.Close()
$rs.Dispose()
$ftp.Abort()
$ftp = $null
}
Hope this helps 🙂