Re: script error
I have added this line to the script "$transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::off" but it still coming up with the same
You do not use the
$transferOptions
anywhere. And your assignment syntax is a nonsense anyway.
See for example:
https://winscp.net/eng/docs/library_powershell#example