文件名查重
Get-ChildItem -Recurse -File | Group-Object Name | Where-Object { $_.Count -gt 1 } | ForEach-Object { $_.Group | Select-Object FullName }
sha1查重
Get-ChildItem -Recurse -File | ForEach-Object { [PSCustomObject]@{ Hash = (Get-FileHash $_.FullName -Algorithm SHA1).Hash; Path = $_.FullName; Name = $_.Name } } | Group-Object Hash | Where-Object { $_.Count -gt 1 } | ForEach-Object { $_.Group | Select-Object Hash, Name, Path }