In this article we will be seeing how to change the Advanced Settings for list in SharePoint 2010 using PowerShell and C#. Go to List =>List Settings => General Settings =>Advanced Settings. Using C#: using (SPSite site = new SPSite("http://serverName:1111/")) { using (SPWeb web = site.RootWeb) { SPListlist=web.Lists["cl"]; // Change the advanced settings // Update the changes list.Update(); } } Using PowerShell $site=Get-SPSite "http://serverName:1111/" $web=$site.RootWeb $list =$web.Lists["cl"] # Change the advanced settings $list.Update() Item-level Permissions: C#: Read access Read all items = 1 Read items that were created by the user = 2 list.ReadSecurity = 2; Create and Edit access Create and edit all items = 1 Create items and edit items that were created by the user = 2 None = 4 list.WriteSecurity = 4; PowerShell: $list.ReadSecurity = 2 $list.WriteSecurity = 4 Attachments: C#: list.EnableAttachments = false; PowerShell: $list.EnableAttachments = $false
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: