SOLVED

Find all SharePoint sites associated with a hub site

Copper Contributor

I am sure this question might have been answered already, but I couldn't locate. Is it possible to use PowerShell to find all SharePoint sites associated with a specific hub site?

 

J Justin

 

2 Replies
best response confirmed by Justin_J945 (Copper Contributor)
Solution
Yes, it's possible...but a little bit tricky:
- You need the Hub Site Id
- Then you can use the $SPOSites = Get-SPOSite -Limit ALL and simply match for every site the HubSiteId property with the Hub Site Id

@Juan Carlos González Martín Thanks very much. As someone reported earlier, https://techcommunity.microsoft.com/t5/Windows-PowerShell/Bug-The-mysterious-case-of-Get-SPOSite/m-p... this 'bug' exists even today. I can get the desired result as mentioned in the workaround section.

 

J Justin

 

1 best response

Accepted Solutions
best response confirmed by Justin_J945 (Copper Contributor)
Solution
Yes, it's possible...but a little bit tricky:
- You need the Hub Site Id
- Then you can use the $SPOSites = Get-SPOSite -Limit ALL and simply match for every site the HubSiteId property with the Hub Site Id

View solution in original post