I'm trying to sync a remote directory to a local Windows server, I was testing the Session.SynchronizeDirectories Method and the code provided worked great after a bit of trial and error!
Today I came across this article:
This is exactly what I'm looking for! So I downloaded it, and tried to run it, I didn't change anything in the script and just passed the arguments it showed in the example. After some trial and error around the fingerprint I got passed that error and now..
Connecting... Looking for changes... Disconnecting... Method invocation failed because [WinSCP.Session] does not contain a method named 'CompareDirectories'.
It sure looks like it's still there:
It's defining it in the script:
$session = New-Object WinSCP.Session