Forum Discussion
Justin_J945
Oct 21, 2019Copper Contributor
Find all SharePoint sites associated with a hub site
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
- Oct 21, 2019Yes, 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
Oct 21, 2019
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
- 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
Justin_J945
Oct 22, 2019Copper Contributor
jcgonzalezmartin Thanks very much. As someone reported earlier, https://techcommunity.microsoft.com/t5/Windows-PowerShell/Bug-The-mysterious-case-of-Get-SPOSite/m-p/342684 this 'bug' exists even today. I can get the desired result as mentioned in the workaround section.
J Justin