Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

Get-SCPItem : -p -r -d options not supported

Open cranstantinople opened this issue 2 years ago • 1 comments

I'm trying to SCP a file from a Cisco router but it seems like Get-SCPItem uses some switches that aren't supported by Cisco. I can SCP the files just fine using regular powershell scp commands. Those switches appear to be used for Recursive, Preserving Date/Times, etc... the files I'm trying to copy don't require any of those switches-- is there any way to disable those switches for Get-SCPItem?

Get-SCPItem $Device.IPAddress -Credential $Device.Credentials -KeyFile $Backup.Key -AcceptKey -Path ":running-config" -PathType File -Destination $Backup.Location -NewName $Device.BackupName

"Get-SCPItem : -p -r -d options not supported" is the error I get

cranstantinople avatar Mar 19 '22 19:03 cranstantinople

No, this is hartdcoded in SSH.net You can try to comment/upvote this issue https://github.com/sshnet/SSH.NET/issues/745

MVKozlov avatar Mar 20 '22 11:03 MVKozlov