Forum Discussion
Simon Denton
Oct 31, 2017MVP
Possible to Set SPO-Site read only?
Will it be possible to use PowerShell to Set a SharePoint Online site as Read Only?
Currently the options are:
NoAccess and Unlock |
https://technet.microsoft.com/en-us/library/fp161394.aspx
Also has the Set-SPO lock state been resolved for Group sites (as mentioned in this article by Drew Madelung)
- Ey Simon, take a look at this post: https://unnieayilliath.com/2017/07/16/sharepoint-online-set-a-site-collection-as-read-only/ Currently is the only option we have
- VladilenBrass Contributor
Seems like MS implemented "ReadOnly" option for SPO.
I just was able to do "Set-SPOSite $site -LockState Readonly".
And getPS C:\Users\Vlad> $site | select Title, Status, LockState | fl
Title : test01
Status : Active
LockState : ReadOnlyand well-known red "This site is read only at the farm administrator's request."
- Viral NaikCopper Contributor
Vladilen do you know if i can turn it off ? i got one site collection restored which is read-only, so i need to know how can i turn off the read-only. Thanks
- VladilenBrass Contributor
I would run something like that:
Connect-SPOService -Url https://contoso-admin.sharepoint.com
$siteUrl = "https://contoso.sharepoint.com/sites/test01"
$site = Get-SPOSite $siteUrl -Detailed
Set-SPOSite $site -LockState Unlock
- Ey Simon, take a look at this post: https://unnieayilliath.com/2017/07/16/sharepoint-online-set-a-site-collection-as-read-only/ Currently is the only option we have
- Thanks Juan, I'll take a look!