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..
Looking for changes...
Method invocation failed because [WinSCP.Session] does not contain a method named 'CompareDirectories'.
Is there a pre-req to this script that I'm missing? Is it no longer valid? was the method changed?
It sure looks like it's still there:
It's defining it in the script:
$session = New-Object WinSCP.Session
What am I missing here? Some insight would help! Thanks!