-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Cannot use disk root prefixed with Windows file namespace (\\?\C:\ or \\.\C:\) #6149
Copy link
Copy link
Open
Labels
Area-FileSystem-Providerspecific to the FileSystem providerspecific to the FileSystem providerIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.
Description
Steps to reproduce
NOTE: it works the same for \\?\C:\ and \\.\C:\.
$ Set-Location \\.\C:\
Set-Location : An object at the specified path \\.\C: does not exist.
At line:1 char:1
+ set-location \\.\C:\
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Location], PSArgumentException
+ FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.SetLocationCommand$ Set-Location \\.\C:\Windows # this works
$ Set-Location ..
Set-Location : Cannot find path '\\C:' because it does not exist.
At line:1 char:1
+ Set-Location ..
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (\\C::String) [Set-Location], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommandIt doesn't work with Get-ChildItem either: Get-ChildItem \\.\C:\ throws an error and Get-ChildItem \\?\C:\ returns an empty list. It may be a separate issue.
Expected behavior
It should work and set the current location to C:\. Notably, the following works in cmd:
$ dir \\?\C:\
Volume in drive \\?\C: is SSD
Volume Serial Number is 6666-СССС
Directory of \\?\C:
05.01.2018 17:01 <DIR> .conan
...Actual behavior
It doesn't work.
Environment data
$ $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0
PSEdition Core
GitCommitId v6.0.0
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-FileSystem-Providerspecific to the FileSystem providerspecific to the FileSystem providerIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.