In this article we will learn about how to retrieve hub sites and associated sites using PnP Powershell and Office 365 admin center url or sharepoint admin center url.
PnP PowerShell script to get all sites connected to a hub site:
- Using PnP PowerShell get all associated or connected sites to a particular hub site.
- Get master report for all sites and their hub sites from the SharePoint online tenant.
PnP PowerShell script to get all sites connected to hub site: Test
Lets see the exported hub sites report – how does it look like?
Master report for all hub sites in the SharePoint online tenant:
All associated sites connected to a single hub site report.
View all sites those are connected to a hub site using sharepoint admin center url:
We need to generate a view to list down the hub site report using the hub site association.
Login to SharePoint admin center url.
If we navigate to SharePoint online admin center url, we will get the below SharePoint admin center page. Then need to click on “Active Sites” link from left-side panel.
Then from the “Active sites” dashboard click on “Hub” -> Filter by Hub -> then select your hub site – this will list down all sites those are connected to that particular hub site.
For an example – I have selected my hub site “SP Hub Site”
Now – we can see all sites those are connected to the hub site “SP Hub Site”
Similarly we can export this report in csv file and we can filter that site report file from the local excel to have a list of all the sites that are part of the same Hub.
To do this we need to follow the below steps:
From the “Active sites” dashboard click on “Export” button. This will export all sharepoint online sites in csv file to your local download folder.
We will get the active sites report as below – from there we can filter as per our need.
Thus, in this article we have learned the below:
- Get all sites associated with a SharePoint Online Hub Site – using SharePoint Online Admin center url.
- Get all sites associated with a SharePoint Online Hub Site using PnP PowerShell.
- How to retrieve hub sites and associated sites using PnP Powershell.
- How to use Get-PnPTenantSite command.
- Create a hub site in sharepoint online.
- How to use Get-PnPHubSite.
- How to export the report in csv file using export-csv command.
- Learn about hub site in SharePoint Online
- Navigation in SharePoint online hub site
- Getting started with PnP PowerShell
- Get hub sites and associated sites using PnP PowerShell
- SharePoint Online Automation – O365 – Download files from a document library using PowerShell CSOM
- SharePoint Online Automation – O365 – Create multiple items in a list using PowerShell CSOM
- SharePoint Online Automation – O365 – Upload files to document library using PowerShell CSOM
- SharePoint Automation: PowerShell script to get remote server information
- SharePoint Online Automation – O365 – Send email from SharePoint online Using CSOM PowerShell script
- SharePoint Online Automation – O365 – Update document library metadata using PowerShell CSOM
- Create modern team site using PnP PowerShell – SharePoint
- In 2 steps convert a classic SharePoint page to modern using PnP
- In 4 steps access SharePoint online data using postman
- Learn SharePoint online administration step by step