darkoperator / darkoperator/Posh-SSH
Get-SCPItem "The given path's format is not supported", but everything is downloaded properly
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
Good day.
I have a problem with Get-SCPItem. Every time I try to download log files from ESXi server in the end of the downloading I receive an error message.
PS C:\Users\Administrator> Get-SCPItem -ComputerName $esxihost.Name -Credential $esxiCredential -Destination `
("$localLogPath"+$esxihost.Name) -Path "/scratch/log" -PathType Directory -Force -AcceptKey -Verbose -Debug
VERBOSE: Using SSH Username and Password authentication for connection.
WARNING: Host key is not being verified since Force switch is used.
VERBOSE: Connection successful
VERBOSE: Downloading /scratch/log
VERBOSE: Item type selected: Directory
VERBOSE: Destination: C:\logs\eam-ce-vbr-w22-31.10.2024.14.23\eam-ce-esxi2.ce.local\log
Get-SCPItem : The given path's format is not supported.
At line:1 char:1
+ Get-SCPItem -ComputerName $esxihost.Name -Credential $esxiCredential ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Renci.SshNet.ScpClient:ScpClient) [Get-SCPItem], NotSupportedException
+ FullyQualifiedErrorId : SSH.GetScpItem
The problem is that everything is downloads properly, but the message is still presented.
As a -Path I use a symlik.
This is my first attempt of writing an issue.
If you need an additional info - please inform.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Get-SCPItem command against an ESXi server with the symlinked /scratch/log path and observe when the error is emitted after downloads complete. Trace the Get-SCPItem entry point and its Renci.SshNet.ScpClient completion and error handling. Done means the directory downloads successfully without presenting a misleading path-format error, with regression coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100