Is there a powershell way to delete duplicate items from document library. there is a column called "OLDGUID" which is same between two files (alone with many other columns). I would like to keep the earlier one (so modified column). Any help will be appreciated.
Thanks
$site = SPSite("http://teams.contoso.com")
$web = $site.rootweb
$list = $web.Lists["Announcements"]
# I may need to run a caml query ...
if($deaditem.count -gt or -e 2)
{
# compare modified date and keep the earliest one
(get-date $deaditem) -lt (get-date 2010-01-01)
$deaditem.Delete()
}
$web.Dispose()
$site.Dispose()