Created
April 21, 2023 12:15
-
-
Save spddl/f1c3f89e48d6c3b6d00d5d1a31d3a5e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Path $env:windir\winsxs | Select-Object "Name" | |
Get-ChildItem -Path $env:windir\winsxs | ForEach-Object { | |
if ($_.Name -like "*msxml*") { | |
Get-ChildItem -Path $_.FullName -Recurse | ForEach-Object { | |
$item = Get-Item $_.FullName | |
if ($item -is [System.IO.FileInfo]) { # Datei | |
if ($item.LinkType -eq "HardLink") { | |
Write-Host "$($_.Target.Count) $($_.FullName)" | |
if ($_.Target.Count -ne 1) { | |
foreach ($itemTarget in $item.Target) { | |
Write-Host "`t$itemTarget" | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment