Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g, "$HOME/Cookies", "$HOME/My Documents".
The .LinkType property of such paths, as returned by Get-Item / Get-ChildItem should contain string 'Junction', but it is currently $null.
Similarly, the .Target property (the link/junctions's target path) unexpectedly contains $null.
Note that these junctions also have the Hidden and System attributes set (in addition to ReparsePoint).
However, even manually recreating a junction with all these attributes set does not reproduce the problem.
Steps to reproduce
Get-Item -Force $HOME/Cookies | Select Mode, LinkType
Expected behavior
Mode LinkType
---- --------
d--hsl Junction
Actual behavior
Mode LinkType
---- --------
d--hsl
Note how the LinkType value is missing.
You can verify that the target path is a junction as follows:
cmd /c dir /aL $HOME | sls Cookies
Environment data
PowerShell Core v6.1.0-preview.3 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build:
Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g,
"$HOME/Cookies","$HOME/My Documents".The
.LinkTypeproperty of such paths, as returned byGet-Item/Get-ChildItemshould contain string'Junction', but it is currently$null.Similarly, the
.Targetproperty (the link/junctions's target path) unexpectedly contains$null.Note that these junctions also have the
HiddenandSystemattributes set (in addition toReparsePoint).However, even manually recreating a junction with all these attributes set does not reproduce the problem.
Steps to reproduce
Expected behavior
Actual behavior
Note how the
LinkTypevalue is missing.You can verify that the target path is a junction as follows:
cmd /c dir /aL $HOME | sls CookiesEnvironment data