Delete duplicate files in a folder using PowerShell
ls *.* -recurse | get-filehash | group -property hash | where { $_.count -gt 1 } | % { $_.group | select -skip 1 } | del
Here's what going on in detail:
ls *.* -recurse # get all files in the current folder and all subfolders
get-filehash # calculate the file hash for all files
group -property hash # group them by the hash value
where { $_.count -gt 1 } # select those groups with more than 1 item
% { # for all groups
$_.group | # output the group content, which are the files
select -skip 1 # select all but the first file
} # (we don't want to delete all of them right?)
del # delete the file