This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Sharepoint Online - Site hub management | |
//Please connect first with - PS> Connect-SPOService -url https://<your tenant>-admin.sharepoint.com | |
//Get all sites containing url sites/mkt | |
Get-SPOSite -limit all | select url,ID | where-object {$_.Url -like "*sites/mkt*"} | |
//Remove a site from the recycle bin | |
Remove-SPODeletedSite -Identity https://contoso.sharepoint.com/sites/sitetoremove | |
//Register a site as Site Hub - principals should be default admin group |