Ok, I have seen: Change working directory to network share – however, it does not seem to work for me on Windows 10.
At work, I have a network share, let’s say, at local IP address 126.96.36.199; so, first I go to a Windows Explorer window, type there
\188.8.131.52, I get asked for a login and password; when I enter my credentials, I get a directory listing, no problem. (and I even get
\184.108.40.206 as a node under
Network in the tree view pane on the left of the Windows Explorer window.)
So, now I open Powershell as administrator, and try this:
PS C:WINDOWSsystem32> cd \220.127.116.11 cd : Cannot find path '\18.104.22.168' because it does not exist. At line:1 char:1 + cd \22.214.171.124 + ~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (\126.96.36.199:String) [Set-Location], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
cmd.exe, ran as Administrator:
C:WINDOWSsystem32>pushd \188.8.131.52 The network name cannot be found.
Net use does not work either:
C:WINDOWSsystem32>net use Y: \184.108.40.206 System error 67 has occurred. The network name cannot be found.
… and yet, the server is fully pingable:
C:WINDOWSsystem32>ping 220.127.116.11 Pinging 18.104.22.168 with 32 bytes of data: Reply from 22.214.171.124: bytes=32 time<1ms TTL=64 Reply from 126.96.36.199: bytes=32 time<1ms TTL=64 Ping statistics for 188.8.131.52: Packets: Sent = 2, Received = 2, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms Control-C ^C
How can I cd into this network share from a terminal (either cmd, or Powershell)?
1: You’ve got the syntax wrong: \servername specifies a server, not a UNC-PATH.
You need to use \servernamesharename as a minimum.
2: You can’t do this with the command-prompt. You must map a network drive to it and use the drive letter in CMD.exe. It will work in PowerShell.
What about a PowerShell Core solution? I was successfull using