Copy List Permissions in SharePoint using PowerShell

Ever wanted to clone permissions between SharePoint lists or Libraries? Well, Here is the nifty PowerShell script to copy permissions between SharePoint lists:

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

#PowerShell Function to copy permissions between Lists in SharePoint
Function Copy-ListPermissions()
 #Get the Web
 $Web = Get-SPweb $WebURL

 #Get Source and Target Lists
 $SourceList = $Web.lists[$SourceListName]
 $TargetList = $Web.lists[$TargetListName]

 #if permissions are Inherited in Source, apply it in Target list 
  else #Copy permissions from Source to Target List
     #Reset the Inheritence in Target List

     #Copy Source list permissions to Destination List
     $SourceList.RoleAssignments | foreach-object {
#Call the function to copy list permissions 
Copy-ListPermissions "" "Documents" "Invoice"

This script copies all users and groups from the source list to the target list. Any custom permissions already applied on the target list will be lost! The above method can be used to copy permissions between SharePoint list items and sites.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience to help others, through the real-world articles!

2 thoughts on “Copy List Permissions in SharePoint using PowerShell

  • where do we input site address, source list name, and destination list name?

    • Just pass them as parameters to “Copy-ListPermissions” function! As in Line#36


Leave a Reply

Your email address will not be published. Required fields are marked *