You cannot call a method on a null-valued expression.
I keep getting the error: You cannot call a method on a null-valued expression.
Even using a basic script like this;
Even using a basic script like this;
$transferOptions = New-Object WinSCP.TransferOptions $transferResult = $session.GetFiles($sourcePath, $destPath, $False, $transferOptions) $transferResult.Check()