sharepoint 2013

Sharepoint Find and remove duplicates in the list using Powershell

Add-PSSnapin microsoft.sharepoint.powershell $web = Get-SPWeb -Identity “” $list = $web.Lists[“List Name”] $AllDuplicates = $list.Items.GetDataTable() | Group-Object title | where {$_.count -gt 1} $count = 1 $max = $AllDuplicates.Count foreach($duplicate in $AllDuplicates) { $duplicate.group | Select-Object -Skip 1 | % {$list.GetItemById($_.ID).Delete()}…

Sharepoint Copy List Permission using Sharepoint Powershell

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue   #PowerShell Function to copy permissions between Lists in SharePoint Function Copy-ListPermissions() { param( $WebURL, $TargetWwebURL, $SourceListName, $TargetListName ) #Get the Web $Web = Get-SPweb $WebURL $TargetWeb=Get-SPweb $TargetWebURL #Get Source and Target Lists $SourceList = $Web.lists[$SourceListName]…