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 :  7    Total :   19537
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

Sharegate: Kick-Ass Tool
Think Your SharePoint & Office 365 Are Secure ? Find Out Now!


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.

clip_image002

Go to SharePoint 2010 Management Shell execute the following command

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

clip_image004

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

clip_image006

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

clip_image008

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

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

clip_image010

Click enter

Go and refresh the page

clip_image012

clip_image014

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

Happy Sharepointing!

Sarath Babu Koneti

Sharepoint Consultant

Yes Labs Pty Ltd

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Categories

KWizCom Forms App