Forum Discussion
F0RCE
Jan 19, 2021Copper Contributor
Block all personal sites in Sharepoint (Microsoft cannot help)
Hello, Is there a way to lock all personal sites. I found a script to block one site Connect-SPOService -Url https://xxx-admin.sharepoint.com $siteUrl = "https://xxx-my.sharepoint.com/per...
- Jan 19, 2021
You can use the Get-SPOSite cmdlet to list all "personal" sites:
$ODFBsites = Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'"
then loop over each site and change the state:
$ODFBsites | % {Set-SPOsite $_.Url -LockState NoAccess }
VasilMichev
Jan 20, 2021MVP
For that, run the Get-SPOSite cmdlet with the -Detailed switch.
F0RCE
Jan 24, 2021Copper Contributor
Unfortunately it was too hard to do for me.
Thanks for trying to help this useless piece of junk (me)