1

I have been able to access UNC paths on a different domain in powershell with: net use \\machine.domain.int\c$\ /user:domain\user $password

this allowed me to directly cd into \\machine.domain.int\c$

However I have now created a networked drive and I'm seemingly not able to do the same.

net use \\machine2.domain.int\Drive\ /user:domain\user $password

Results in success but I am unable to cd into the directory. However if I map the drive with

net use Y: \\machine2.domain.int\Drive\ /user:domain\user $password

I can access its contents from Y:\ but not from \\machine2.domain.int\Drive\

What can I do if I absolutely do not want to map the path to a drive?

edit: The machines in question are two separate machines that are on the same domain.

edit2: Same thing happens when creating a new PSDrive. Both succeed but when trying to enter the directory the second one errors with: Cannot find path 'path' because it does not exist

edit3:

I did a lot more digging and tried all the combinations I could think of

Works:

net use Y: \\machine2.domain.int\Drive /user:domain\user $password

net use \\machine2.domain.int\c$\Path /user:domain\user $password

New-PSDrive -Name "P" -PSProvider "FileSystem" -Root "\\machine2.domain.int\c$\Path"

Doesn't work:

net use \\machine2.domain.int\Drive /user:domain\user $password

net use \\machine2.domain.int\Drive\ /user:domain\user $password

New-PSDrive -Name "P" -PSProvider "FileSystem" -Root "\\machine2.domain.int\Drive"

New-PSDrive -Name "P" -PSProvider "FileSystem" -Root "\\machine2.domain.int\Drive" -Persist (New error! new-psdrive : To use the Persist switch parameter, the drive name must be supported by the operating system (for example, drive letters A-Z).)

Problems:

I can not use \\machine2.domain.int\c$\Path because it requires an administrative account.

I absolutely do not want to make a permanent drive

It looks like one of the systems does not support using the \\machine2.domain.int\Builds syntax (except with net use Y:), anyone got any clues on fixing this?

RusinaRange
  • 341
  • 1
  • 4
  • 18
  • did you initiate the `net use` command from the same PS prompt? – 4c74356b41 Jan 18 '17 at 13:11
  • The same one I tried cd with? Ofcourse – RusinaRange Jan 18 '17 at 13:13
  • ``filesystem::\\machine2.domain.int\Drive\`` – user4003407 Jan 18 '17 at 16:20
  • This may be wildly over-simplifying, but have you tried `net use` without the trailing backslash on the path? e.g. `net use * \\machine2.domain.int\Drive`? After that, I'd review the output of `net use`, `get-smbconnection`, and `get-smbmapping` to see if you've previously mapped anything that might be interfering. – Matthew Wetmore Jan 18 '17 at 17:33
  • I have, also the output of `net use` is the same for both cases. I also tried this using machine2 through the filesystem path eg. c$\path and it did work in that case. – RusinaRange Jan 19 '17 at 08:44
  • @PetSerAl with that path I get `The network name cannot be found` – RusinaRange Jan 19 '17 at 08:56

0 Answers0