PowerShell: How to Stop Inheriting Permissions in SharePoint Lists

In this article, we’ll show you how to break permissions in SharePoint lists with the following requirements:

  • Allow the user to input the Site URL and List Name as needed
  • Break permission for the list if it contains permission inheritance
  • Remove all users from the list but retain the permissions of item Created By
  • Remove all groups from the list but retain Home Owners and Home Members group
  • Break permission for Items
  • Retain the permissions of item Created By
  • Add Owners group to all items

Allow the user to input the Site URL and List Name as needed

The script below allows the user to input the Site URL containing some special characters (e.g. %20 instead of space).

The script below allows the user to input the List Name required. 

Break permission for the list if it contains permission inheritance

First, check to see whether or not the list contains permission inheritance.

Remove all users from the list but retain the permissions of item Created By  

Remove all groups from the list but retain Home Owners and Home Members group

Break permission for Items

Retain the permissions of item Created By

Add Owners group to all items

How does it work?

Download the StopInheritingPermissions.ps1 file to your server.

Let’s create a SharePoint list on your site. In this example, I’ll create My List with Tasks list type. And I’ll also create items with different account names.

Make sure the list contains permission inheritance.

Run the PowerShell script with parameters as pictured below. 

Check the results on your list. Make sure the requirements above are included.

Permissions for this list

Permissions for Item


SharePoint

Applications

SharePoint apps are stand-alone applications that perform specific tasks on a SharePoint site. Apps can perform functions such as managing a discussion board or knowledge base, performing project management or time tracking tasks, or doing other workflow operations.

SharePoint

Product Suites

Experience greater power and savings by bundling our SharePoint apps and web parts.


Essentials


Essentials Plus


Bamboo Premier


Project Management Suite


Knowledge Management Suite


External User Manager


SharePoint

Web Parts

Extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of Web Parts. Web Parts are the building blocks of pages on a SharePoint site that can be used to customize the user interface and content of a site page. 

SharePoint

Product Suites

Experience greater power and savings by bundling our SharePoint apps and web parts.


Essentials


Essentials Plus


Bamboo Premier


Project Management Suite


Knowledge Management Suite


External User Manager


Office 365

Cloud Parts

Cloud Parts are functional components that extend your SharePoint environment whether it’s hosted, on-premises, or part of Microsoft Office 365. More than mere ports of existing software to the cloud, our Cloud Parts have been built from the ground up to take advantage of the best that the cloud has to offer.

SharePoint

Product Suites

Experience greater power and savings by bundling our SharePoint apps and web parts.


Cloud Parts Suite for O365/SP Onl.


Featured Services

SharePoint Health Check

A SharePoint Health Check will identify the causes of issues and risks associated with your specific environment, and is custom tailored to provide you with the best recommendations to optimize your SharePoint environment.

SQL Health Check

Document recommendations relating to performance, stability, availability, or a specific focus you request of your SQL Server database instances.

My SharePointXperts

The truth is that each SharePoint skill may not be a full time job for many organizations, and it is nearly impossible for one person to do everything you need – so augment your team with SharePointXperts; providing the skill sets you need when you need them!