For some PS script, I need Get-ChildItem to work with '\\?\...' I tried with the original version, 4.0, but no luck :
Get-ChildItem : Illegal characters in path.
I tried on my PC (Win 10 1703) and it works correctly :
Get-ChildItem -LiteralPath '\\?\C:\'
Directory: \\?\C:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 03/12/2018 16:23 driver
d----- 13/11/2018 12:14 EmpirumPackages
d----- 13/11/2018 10:27 FibocomLog
d----- 15/11/2018 16:01 Intel
d----- 15/06/2018 17:27 PerfLogs
d-r--- 18/12/2018 08:12 Program Files
d-r--- 12/12/2018 10:59 Program Files (x86)
d-r--- 18/11/2018 07:06 Users
d----- 14/12/2018 08:36 Windows
-a---- 18/12/2018 08:35 9756932 action.log
-a---- 13/11/2018 10:11 655360 alertlog.dat
-a---- 13/11/2018 12:14 15361 Thininstaller.log
(I copy pasted the command so no problem here)
I read somewhere that it was working from PS 5.0 and onwards, therefore I installed PS 5.1 on my Win 2012 server but still no luck.
Get-ChildItem : Illegal characters in path.
Here is my server output :
Name Value
---- -----
PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.34014
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
And my PC output
Name Value
---- -----
PSVersion 5.1.15063.1478
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.1478
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Any idea what's happening ?