question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New/Set-SFTPItem exception on Windows Server 2019

See original GitHub issue

Using New-SFTPItem I am receiving the following error when attempting to create a file on a Windows Server 2019 VM:

Exception calling "Get" with "1" argument(s): "No such file"

The command I am using:

New-SFTPItem -SFTPSession $SFTPSession -Path "C:\Users\username\test.json" -ItemType "File"

I have also tried using linux pathing using forward slashes. The strange thing is the error occurs, but the file is created on the VM. Furthermore, trying to then set the contents of this file using Set-SFTPItem produces the following error:

Set-SFTPItem : C:\Users\username does not exist

The command I am using for this:

Set-SFTPItem -SFTPSession $SFTPSession -Destination "C:\Users\username" -Path "test.json" -Force -Verbose:($PSBoundParameters["Verbose"] -eq $true) -ErrorAction "Stop"

I have verified that the file is in fact created in the correct path and the destination path exists.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
darkoperatorcommented, Mar 16, 2020

A Ubuntu system, don’t have Windows test targets with SSH enabled at the moment. Installing one today

0reactions
dbrennandcommented, Mar 18, 2020

Yeah this issue is resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with server 2019
Hello all. I am having an issue with my server Win Server 2019, and I am not sure what it not configured right....
Read more >
WinHTTP Proxy Service Stopping on Server 2019
The error message suggests a problem with the endpoint mapper database entry. Restarting the VM temporarily resolves the issue, but it's not ...
Read more >
Windows server 2019 - Cannot install features
I am getting below error while trying to add either WAS-NET-Environment or NET-HTTP-Activation features in windows server 2019.
Read more >
Issues with server 2019 and .net - Microsoft Q&A
I have a website setup on the server, it is an asp,net MVC site. When I browse to the site I get a...
Read more >
WMI exception occurred on Server ' ' : access is denied ...
Hi, I currently installed new exchange server on my DRC site, I have exchange server 2016 on my DC and exchange server 2019...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found