How To: Make your SharePoint 2010 site collection read-only, restrict delete

Sarath Babu Koneti
SharePoint Consultant, Yes Labs Pty Ltd, Sydney
Published On :   19 Dec 2013
Visit Count
Today :  3    Total :   21548

There are a couple of ways in doing this.

1. Out of the box way - Central Administration > Site Collections > Configure Quotas and Locks > Site Lock Information

2. Set SharePoint Content Database in Read-Only Mode, SQL Server Management Studio. Right-click on the database -> Options -> Make database read only -> True

3. Using PowerShell

The sample explained is by using PowerShell

Before locking we will be having the options like below, New document/Upload document enabled.


Go to SharePoint 2010 Management Shell execute the following command

 Set-SPSite -Identity "http://spsite/sites/NewContentDB" -LockState "ReadOnly"


After locking, new document and upload document controls are disabled. The controls are greyed out.


We will not be able to upload new documents. Also we will not be able to delete any existing documents.


To make the site accessible again, run the unlock command as shown below.

 Set-SPSite -Identity "http://spsite/sites/NewContentDB" -LockState "ReadOnly"


Click enter

Go and refresh the page



Now the controls are enabled. Site can be accessed normally.

Happy Sharepointing!

Sarath Babu Koneti

Sharepoint Consultant

Yes Labs Pty Ltd