View a list of symbolic links on system?
Try the following command:
dir /AL /S C:\
/A
displays all files with a specific attribute, andL
specifies reparse points (symlinks and directory junctions)/S
makes the command recursive- replace
C:\
with the drive letter you want to scan, or with a path if you don't want to scan an entire drive
In PowerShell
Get-ChildItem -Path C:\ -Force -Recurse -ErrorAction 'silentlycontinue' |
Where { $_.Attributes -match "ReparsePoint"}
-Force
includes hidden and system files-Recurse
gets all child items-ErrorAction 'silentlycontinue'
suppresses Access to the path XYZ is denied errorsWhere { $_.Attributes -match "ReparsePoint"}
checks folders and files if it's a junction
Explanation of Mode and Attributes†:
PS > GCI | SELECT Mode,Attribuets -Unique
Mode Attributes
---- ----------
d---- Directory
d---s System, Directory
d---- Directory, NotContentIndexed
d---- Directory, Compressed
la--- Archive
-a--- Archive
lar-- ReadOnly, Archive
-a--- Archive, Compressed
There's also a handy program for that called NTFSLinksView.
Edit: there's also SageLinks, this one checks the validity too.