Closed madsholme closed 1 year ago
just a note, this is from a remote execusion with winrm, but the same thing happens when i run it local.
Is this your exact code? you are missing a \
in your path
$GetFilesFacility= "\serverapp\d$\Moved_files\MyFiles"
should be $GetFilesFacility= "\\serverapp\d$\Moved_files\MyFiles"
Also, you are using the GetFiles
method on the $session
object. Thats calling the winscp.dll directly. Clone this repo with the 5.21.8 assembly and use the Receive-WinSCPItem
cmdlet over that direct method call. I do some path validation and resolving in the wrapper function.
So, I had a little bit of time, I replicated this all out, and Receive-WinSCPItem
works with a PSDrive. Im closing this out.
Issue Description
When using psdrive as a path to download/upload files it failes with "cannot create..." if i run the same script and do a dir MyPSDrive:\ it output the files correctly.
Example
Expected Output
WinSCP-PowerShell Version
5.21.7.0
Environment
Windows server 2016