Lock a SharePoint site read-only for a migration cutover
Freeze a site during cutover with one command. It doesn't change permissions, and you must unlock it before deleting data.
Lock
Connect-SPOService -Url https://<tenant>-admin.sharepoint.com
Set-SPOSite -Identity https://<tenant>.sharepoint.com/sites/<site> -LockState ReadOnly
Users can still open and read files, but nobody can edit, upload or delete.
Good to know
- It doesn’t change permissions. Unlocking puts everything back exactly as it was.
- You must unlock the site before you can delete data from it, or delete the site, at the end of the migration.
Unlock
Set-SPOSite -Identity https://<tenant>.sharepoint.com/sites/<site> -LockState Unlock
Verify
Get-SPOSite -Identity <url> | Select LockState shows ReadOnly, and a test upload fails.
Seeing this in your environment?
We can check for this, and everything around it, as part of an audit.