You cannot navigate to directories above the shared directory. So this works via the command prompt under my domain admin account which has access to the UNC path.
But this workaround will let you. At …
Share this item with your network: By.
In PowerShell you should be able to cd to a network drive without any errors as it natively supports UNC paths and the cd command. I would ideally like this to be able to run under the local Administrator account. You can do this with the mount command as usual, with the filesystem "drvfs" provided by WSL: sudo mount -t drvfs '\\server\share' /mnt/share Single quotes are useful around the UNC path so that you don't have to escape the backslashes. So, for example, if we wanted to map drive letter S to the share \\tower\movies, we’d use the following command: net use s: \\tower\movies You technically cannot connect to a UNC path using RunAs under Windows 2000. Marquia Jones; Published: 18 Apr 2003.
Using the RUNAS command with UNC paths. When no file_path is specified, the UNC path simply points to the top-level folder of the share. First, get the complete path to the network location you’d like to access. The file_path portion of a UNC name references a local subdirectory beneath the share section. To move Command Prompt into a network directory, you need to use the pushd command. Try to run "cmd" under higher privileged user and see if the command goes right now. This tip was submitted to the SearchWin2000.com tip exchange by member Marquia Jones. Under the HKey Current User, drill down to Software\Microsoft\Command Processor. Instead of cd command in CMD you can use a pushd command, that creates a drive mapping to the network share and then changes into a path relative to the share it creates. Add a value if it doesn’t already exist, called DisableUNCCheck . This will allow access to that UNC path under the specified credentials. A little two-liner as an example would be This part of the path is optional. Members of many of the types in the System.IO namespace include a path parameter that lets you specify an absolute or relative path to a file system resource. Then, all the operations are over drive:\folders. CMD does not support UNC paths as current directories. File path formats on Windows systems. I can only get it to work for the users with a straight copy. You don't need to specify a drive letter. Also, if you schedule your command as a task, you must run it under some domain user, who has access to both source and target servers, otherwise it would be processed under local system account, which doesn't have any network permissions. pushd will create a drive mapping over the unc path and then change to it. The first command works fine (assuming you have a c$ share enabled and are able to access it), and the second command gives a “Cannot find path” error, because the Registry provider tried to work with the UNC path instead of the FileSystem provider. Once you have the UNC path available under alternate credentials, you can launch an explorer session to the UNC path manually or by using start.exe as in start \\server\share. XCopy works fine on my PC. Just before the copy is executed there is a message that "UNC Paths are not supported" To map a network drive, type the following command and then hit Enter: net use DRIVE: PATH. Access UNC paths from the Windows command line Published 04/02/2019 By Aleksander Nordgarden-Rødner I am, with surprising regularity, faced with the need to access UNC paths from the command line, as that is perhaps pretty much the quickest way to browse to network shares with a different user than the one currently logged in.