Just now getting back to this. Was able to test this tonight and PowerShell does not recognize the null option and throws this exception:
The term 'null' is not recognized as the name of a cmdlet, function, script file
, or operable program. Check the spelling of the name, or if a path was included
, verify that the path is correct and try again.
So back to the drawing board...
This is what I had in my PS script:
Edit: Got it!
Had to use this for PowerShell to pick it up:
$transferOptions.FilePermissions = $null
$transferOptions.PreserveTimestamp = $false
Worked like a charm!
The term 'null' is not recognized as the name of a cmdlet, function, script file
, or operable program. Check the spelling of the name, or if a path was included
, verify that the path is correct and try again.
So back to the drawing board...
This is what I had in my PS script:
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.FilePermissions = null
$transferOptions.PreserveTimestamp = false
Edit: Got it!
Had to use this for PowerShell to pick it up:
$transferOptions.FilePermissions = $null
$transferOptions.PreserveTimestamp = $false
Worked like a charm!