SharePoint Online Set a site collection as Read Only

Screen Shot 2017-07-16 at 23.11.36

There are many different business scenarios when we want to set a SharePoint site collection as read-only mode (as shown in above screenshot) to prevent any further addition/modification of content but simultaneously to make the existing content available to the users.

Using SharePoint Online Management Shell

Set-SPOSite -Identity “<SiteURL>” -LockState “ReadOnly”

Read more about other lock statuses here

Using PnP PowerShell

Connect-PnPOnline -Url “<SiteURL>” -Interactive

Set-PnPSite -LockState ReadOnly

Read more about Set-PnPSite command.

3 thoughts on “SharePoint Online Set a site collection as Read Only

  1. Try:
    set-SPSite – Identity “url_to_site” -LockState “ReadOnly”

    -LockState

    Sets the lock state of this site collection. The valid lock states are

    Unlock Unlocks the site collection and makes it available to users

    NoAdditions Prevents users from adding new content to the site collection. Updates and deletions are still allowed

    ReadOnly Prevents users from adding, updating, or deleting content.

    NoAccess Prevents access to content completely. Users who attempt to access the site receive an access-denied message.

    https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/set-spsite?view=sharepoint-ps#examples

  2. I like the helpful info you provide for your articles. I will bookmark your blog
    and test once more here regularly. I’m rather certain I’ll learn a lot of new stuff right here!

    Good luck for the following!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s