Skip to content

Instantly share code, notes, and snippets.

@aravindmp
Created May 12, 2017 02:13
Show Gist options
  • Save aravindmp/53ce05deefdf21482747db884460ccab to your computer and use it in GitHub Desktop.
Save aravindmp/53ce05deefdf21482747db884460ccab to your computer and use it in GitHub Desktop.
Powershell for SharePoint item level security
$listWeb = Get-SPWeb -Identity $url
$lst = $listWeb.Lists.TryGetList($listName)
if($lst -ne $null)
{
#Read all items = 1. Read items that were created by the user = 2
$lst.ReadSecurity =2
#Create and edit all items = 1. Create items and edit items that were created by the user =2
$lst.WriteSecurity =2
$lst.NoCrawl = $true;
$lst.EnableAttachments = $false;
$lst.Update();
}
@aravindmp
Copy link
Author

No CSOM available as of now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment