Re: I tried the steps in this page:
I'm sorry, but you didn't tell us anything about the problems you are facing. Without any information, all I can do is to repeat everything that's written in the linked article already.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
#Load WinSCP .NET assembly
Add-Type -Path "C:\local path\WinSCPnet.dll"
# Set up session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Sftp
HostName = "host or IP address"
UserName = "username"
Password = "password"
SshHostKeyFingerprint = ""
}
$session = New-Object WinSCP.Session
try
{
# Connect
$session.Open($sessionOptions)
# Transfer files
$session.PutFiles("C:\\localFile.csv", "/remote directory/*").Check()
}
finally
{
$session.Dispose()
}