Enable Item-Level Permissions on Document Library in SharePoint using PowerShell

SharePoint Lists provide item level security options such as "Read items that were created by the user" or "Create items and edit items that were created by the user" under "Advanced Settings" page in SharePoint list settings.

But you don't get these options to set Item level security in SharePoint document libraries! Say your requirement is to restrict users to view and edit other's documents and allow only their own documents in a document library! If you need these options, you can utilize PowerShell to enable Item level permissions on SharePoint document libraries as there is no UI available!
item level permission in sharepoint 2013 document library
These settings configures ReadSecurity and WriteSecurity properties of SPList object.

Change Read Security with PowerShell:
$web = Get-SPWeb "http://Your-SharePoint-Site"
$list = $web.Lists["Your Document Library Name"]
$list.ReadSecurity = 2
  • Read all items: 1
  • Read items that were created by the user: 2
Change Write Security permissions programmatically:
$web = Get-SPWeb "http://Your-SharePoint-Site"
$list = $web.Lists[“Your Document Library Name”]
$list.WriteSecurity = 2
  • Create and edit All items: 1
  • Create items and edit items that were created by the user: 2
  • None: 4
Please note, These settings will not have any effect for Site owners and administrators!


  1. Sadly - document library item level permissions have been deprecated. Now you have to explicitly create folders and share it for each person in your team.

  2. I guess the above powershell only works in SharePoint On-premise document library. Do you have similar powershell to use for SharePoint online Document library? Thank you so much!

    1. Never mind, I was able to set the Item-Level permission in SharePoint Online, Document Library, using the pnp powershell you shared in one of your blog titled "How to Set Item-Level Permissions in a List?", link below. Much appreciated for the great work!

      #Read more: https://www.sharepointdiary.com/2019/05/sharepoint-online-set-item-level-permission-in-list.html#ixzz6oYAtLLFA".


Please Login and comment to get your questions answered!

Powered by Blogger.