Need a PowerShell cmdlet that lists all sites connected to a Hub site
We need a cmdlet that lists all the sites that are linked to a Hub Site. Maybe call it Get-SPOHubSiteLinkedSites and it would take as a parameter the URL of the Hub Site.
As announced at Ignite, the modern SharePoint admin experience will be releasing the ability to view all sites associated to a hub by end of year.
For hub site visitors, you can leverage the Sites web part to display all sites associated to the hub as well (provided the visitor has access to the sites).
thanks Admin. but the ask is to have a PowerShell commandlet please. for automation and governance purposes.
Anjani Ch commented
Any update on this?
By when could we expect this powershell command... please respond
Nick Thoman commented
Was looking for a way to do this today.... Please add!
This would be awesome!
Given we can now use SharePoint Management Shell to create Hub Sites and associate sites with them. It would be great to be able to manage these over time with a cmdlet like:
get-SpoHubSiteAssociation -hubsite <https://HubSiteURL>
to show all the sites associated with a named hub. This would help with Hub Site management once they start to grow legs!
Michael Blumenthal commented
See https://docs.microsoft.com/en-us/sharepoint/dev/features/hub-site/hub-site-powershell for the existing Hub Site cmdlets.