PowerShell cmdlets for SharePoint hub sites
The hub sites feature is currently in preview and is subject to change. It is not currently supported for use in production environments.
Use PowerShell cmdlets to create and manage SharePoint hub sites.
To run the PowerShell cmdlets:
Download and install the SharePoint Online Management Shell. If you already have a previous version of the shell installed, uninstall it first, and then install the latest version.
Follow the instructions at Connect to SharePoint Online PowerShell to connect to your SharePoint tenant.
To verify your setup, try using the Get-SPOHubSite cmdlet to read the current list of hub sites. If the cmdlet runs and returns with no errors, you're ready to proceed.
Hub site cmdlets
The following PowerShell cmdlets are available for managing hub sites:
|Add-SPOHubSiteAssociation||Adds a new association between a site and a hub site.|
|Remove-SPOHubSiteAssociation||Removes an association between a site and a hub site.|
|Get-SPOHubSite||Lists hub sites or hub site information.|
|Grant-SPOHubSiteRights||Grants rights to users or security groups to access the hub site.|
|Register-SPOHubSite||Enables the hub site feature on a site to make it a hub site.|
|Revoke-SPOHubSiteRights||Revokes rights for specified principals to a hub site.|
|Set-SPOHubSite||Sets the hub site information such as name, logo, and description.|
|Unregister-SPOHubSite||Disables the hub site feature on a site.|
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.