Office-docs-powershell: Unable to set -LockState Readonly on particular Site Collection (all other works fine)

Created on 20 Aug 2019  路  7Comments  路  Source: MicrosoftDocs/office-docs-powershell

I'm attempting to set a Site Collection from Unlock to Readonly. This Site Collection happens to be "https://tenant.sharepoint.com", so I'm unsure if that factors into it. I'm running:

Set-SPOSite https://tenant.sharepoint.com -LockState Readonly

When I do this with any other Site Collection like "https://tenant.sharepoint.com/sites/pwa", it unlocks just fine, but for this Site Collection, I get the error:

Capture

Any ideas?

All 7 comments

@officedocsbot assign @yogkumgit

Hello @FedeFigueredo
AFAIK you can't set the LockState property of the root tenant site collection.
Will propose adding a note to the article.
Thank you

@trent-green Please merge the PR #3883

@get-itips Thank you very much for the contribution and updating the documentation with PR. @FedeFigueredo Hope this update is helpful for you. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.

There麓s not any chance of fixing this bug? So -LockState property can be used on root tenant site collection.

Hello @FedeFigueredo please submit the proposal here https://sharepoint.uservoice.com/ as that is the right resource to propose ideas/features.
Thank you

OK @get-itips. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andikrueger picture andikrueger  路  5Comments

federico-r-figueredo picture federico-r-figueredo  路  5Comments

Staffanb88 picture Staffanb88  路  3Comments

tomlarse picture tomlarse  路  5Comments

Archehandoro picture Archehandoro  路  4Comments