Skip to content

Instantly share code, notes, and snippets.

@spddl
Created April 21, 2023 12:15
Show Gist options
  • Save spddl/f1c3f89e48d6c3b6d00d5d1a31d3a5e6 to your computer and use it in GitHub Desktop.
Save spddl/f1c3f89e48d6c3b6d00d5d1a31d3a5e6 to your computer and use it in GitHub Desktop.
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