How to Find and Delete Duplicate Files using PowerShell? - SharePoint Diary

PHOTO EMBED

Wed Oct 02 2024 21:58:40 GMT+0000 (Coordinated Universal Time)

Saved by @sariohara

Get-ChildItem -path C:\Temp -Recurse -File | 
   Group-Object -property | Get-FileHash | Group-Object -property Hash | Where-Object { $_.count -gt 1 } | 
          ForEach-Object { $_.Group | Select-Object Path, Hash }
content_copyCOPY

https://www.sharepointdiary.com/2022/05/find-and-delete-duplicate-files-using-powershell.html