Make a site collection read only in SharePoint

In this post, we will discuss how to make a site collection read-only in SharePoint.

Also, you can check out:

SharePoint deveopment training course

Delete a list item using JavaScript object model in SharePoint 2013

SharePoint 2016 Open HTML File in Browser Instead of Promoting to Download

SharePoint 2013 Authentication

To make a site collection read-only means we are preventing users from adding, updating, or deleting content in the site collection.

You can also make a site collection as Adding content prevented, which means to prevent users from adding new content, also we can make site collection as “No Access” which means to prevent users from accessing the site collection and its content.

We can make a site collection read only by using SharePoint Central Administration, By using PowerShell and by using Server-side object model.

SharePoint Central Administration:
Open SharePoint Central Administration then selects Application Management.

From the Application Management screen click on Configure quotas and locks from Site Collection section.

This will open the Site Collection Quotas and Locks screen, Select the Read-Only radio button under the Lock status for this site: section. And then click on OK.

First, open SharePoint Management Shell, make sure you are opening in Administrator mode.

Set-SPSite -Identity “<SiteCollection>” -LockState “<State>”

Set-SPSite -Identity “http://SiteCollectionURL” -LockState “ReadOnly”

Object Model:
Below is the object model code to make site collection readonly:

SPSite site = new SPSite(“http://SiteCollectionURL”);
site.ReadOnly = true;

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)


About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →