Hub Site Association drop down shows deleted hub sites

If a hub site is deleted before it is disconnected from site collections that are associated too it, those sites may remain in the hub site association drop down when you go to use it later on. This can be confusing, for example if the deleted site was created again with the same name it will appear twice.

To clean up the drop down, fun the following cmdlets in powershell;

Connect-SPOService -Url https://tenantname-admin.sharepoint.com
#Review list of hub sites, orphaned url should show
Get-SPOHubSite
#PNP Connect
Connect-PNPOnline -Url https://tenantname-admin.sharepoint.com
#Remove the orphaned url
Unregister-PnPHubSite -Site https://tenantname.sharepoint.com/sites/hubsitename
#Check the orphaned hub site has gone
Get-SPOHubSite

After this, check the hub site association drop down and it should now be clear.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s