Copy-WinSCPItem : Cannot bind argument to parameter 'Path' because it is null.
Hi all, im tired of this error, mi code its really simple and i dont know whats wrong whit it.
This its the error:
Import-Module WinSCP $credenciales = get-credential $opciones = New-WinSCPSessionOption -HostName "ip_address" -Credential $credenciales -PortNumber "22" -SshHostKeyFingerprint "m6MF3ChDcoZjIxkzDKspcGprjm5qb5lwVhpYUZZlU/I" $sesion = New-WinSCPSession -SessionOption $opciones Write-Host "copy0" $ruta = "\temp\file.csv" Copy-WinSCPItem -Path $ruta -Destination "C:\Users\david_salamanca\Documents\folder" Write-Host "copy1"
Copy-WinSCPItem : Cannot bind argument to parameter 'Path' because it is null. At C:\Users\david_salamanca\Documents\Untitled1.ps1:8 char:1 + Copy-WinSCPItem -Path $ruta -Destination "C:\Users\david_salamanc ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Copy-WinSCPItem], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Copy-WinSCPItem