Commands › SharePoint Online

Register-SPOHubSite

SharePoint Online Microsoft.Online.SharePoint.PowerShell Register-*

Enables the hub site feature on a site to make it a hub site. For more information visit SharePoint hub sites overview.

Quick start script

# Register-SPOHubSite — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Register-SPOHubSite -Principals <String[]> -Site <SpoSitePipeBind> | Format-List

# 3. Export for evidence / drift tracking
Register-SPOHubSite | Export-Clixml .\SPOHubSite-$(Get-Date -Format yyyyMMdd).xml

Syntax

Register-SPOHubSite [-Site] <SpoSitePipeBind> -Principals <String[]> [<CommonParameters>]

Parameters (2)

ParameterTypeRequiredWhat it controls
-Principals String[] yes Specifies one or more principals (user or group) to be granted rights to the specified HubSite. Can be used to filter who can associate sites to this hub site.
-Site SpoSitePipeBind yes Specifies the URL of the site collection to which to enable the hub site features.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.