Created
May 12, 2017 02:13
-
-
Save aravindmp/53ce05deefdf21482747db884460ccab to your computer and use it in GitHub Desktop.
Powershell for SharePoint item level security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No CSOM available as of now.