Cannot change -LockState

Occasional Contributor

I have a problem with my Sharepoint Online instance. To prevent sharing files in Microsoft Teams I have locked all personal sites for my previous tenant domain. It works flawlessly, as people cannot use OneDrive anymore.

We then used AD Connect to migrate all users from local AD. We took away right to create personal site with storage for everyone, so when user try to log in OneDrive he gets an error. It works - personal sites are not created.

But before we took away create personal site right - we manually transfered two accounts. Now they are synchronized too. They had mysite tho I so blocked it toghether with the rest.

The problem is that I cannot unlock this mysite anymore...

Set-SPOSite -Identity "" -LockState "Unlock" Does not work. It does not print any errors...

I use this to check status:

    Foreach($Site in $Sites){      
        Write-Host $Site.Url  
        Write-Host $Site.LockState

It shows name of the site and status So I change correct name but the script shows that nothing changes...

Any ideas?

This is a weird situation cause I can lock/unlock all sites from online tenant no problem. I have problems with new sites from local AD...


I contacted Microsoft but theirs support didn't help me - they told me to execute this query and go back with results:

Set-SPOSite -Identity "" -LockState "Unlock"

When I already did that and showed this query in my initial request for help. I am lost :( 

0 Replies