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

Sarath Babu Koneti
 
SharePoint Consultant
December 19, 2013
 
Rate this article
 
Views
26533

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

Category : SharePoint

Author Info

Sarath Babu Koneti
 
SharePoint Consultant
 
Rate this article
 
Working as a Sharepoint Consultant ~ Yes Labs Pty Ltd, Sydney ...read more
 

Leave a comment