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.
Leave a Reply