Consider using the PSFTP Powershell Module instead of the Internet Explorer COM object. Install it with the following command:
Install-Module PSFTP
Basically, use Set-FTPConnection to open a session to the FTP server, New-FTPItem for creating new FTP directories, and Add-FTPItem to upload new files. Get-FTPItem would be used to retrieve a remote file.
Here are some samples from the TechNet Gallery site:
Import-Module PSFTP
Set-FTPConnection -Credentials mgajda -Server ftp://ftp.server.org -Session MyTestSession -UsePassive
$Session = Get-FTPConnection -Session MyTestSession
New-FTPItem -Session $Session -Name TestRootDir
New-FTPItem -Session $Session -Name TestDir1 -Path /TestRootDir
New-FTPItem -Session $Session -Name TestDir2 -Path /TestRootDir
New-FTPItem -Session $Session -Name TestDir11 -Path /TestRootDir/TestDir1
Get-FTPChildItem -Session $Session -Path /TestRootDir -Recurse -Depth 2
"Test File" | Out-File TestFile.txt
Get-ChildItem TestFile.txt | Add-FTPItem -Session $Session -Path /TestRootDir
Get-ChildItem TestFile.txt | Add-FTPItem -Session $Session -Path /TestRootDir -Overwrite
Get-ChildItem TestFile.txt | Add-FTPItem -Session $Session -Path /TestRootDir/TestDir1
Get-ChildItem TestFile.txt | Add-FTPItem -Session $Session -Path /TestRootDir/TestDir2 -BufferSize 5
Add-FTPItem -Session $Session -Path /TestRootDir/TestDir1/TestDir11 -LocalPath TestFile.txt
Get-FTPChildItem -Session $Session -Path /TestRootDir -Recurse -Depth 2
Get-FTPChildItem -Session $Session -Path /TestRootDir -Recurse
Get-FTPItemSize -Session $Session -Path /TestRootDir/TestDir1/TestFile.txt
Rename-FTPItem -Session $Session -Path /TestRootDir/TestDir1/TestFile.txt -NewName TestFile2.txt
Rename-FTPItem -Session $Session -Path /TestRootDir/TestDir1/TestFile2.txt -NewName ../TestFile2.txt
Get-FTPChildItem -Session $Session -Path /TestRootDir | Get-FTPItem -Session $Session -LocalPath C:\test
Get-FTPChildItem -Session $Session -Path /TestRootDir -Recurse | Get-FTPItem -Session $Session -LocalPath C:\test -RecreateFolders
Get-FTPChildItem -Session $Session -Path /TestRootDir -Filter TestF* | Remove-FTPItem -Session $Session
Remove-FTPItem -Session $Session -Path /TestRootDir -Recurse
Building the credential
There are a few ways of securely building a credential object. The (usually) best way is to use Get-Credential:
$cred = Get-Credential $user
However, Get-Credential will always prompt you for the password. As long as you generate the above credential on the same machine with the same user who needs to decrypt the credential, you can store the credential object on the filesystem and read it in later (as the same user on the same machine) to use the credential in other sessions.
Assuming you created $cred as I've shown above:
# Export the credential object to a file on disk
$cred | Export-CliXml C:\path\to\secretAD.xml
# Import the credential object later on
$cred = Import-CliXml C:\path\to\secretAD.xml
Export-CliXml and Import-CliXml are two handy cmdlets that let you serialize any Powershell object to disk and read it back into another Powershell session later on. There are some limitations to this (don't try using a COM object read in this way for example) but it works fine for the case of storing and reading credential objects.
If you want a more portable method of encrypting the password in a credential, see the second example here.