Commands › SharePoint Online

Add-SPOHubToHubAssociation

SharePoint Online Microsoft.Online.SharePoint.PowerShell Add-*

Associates a hub site to a hub site. Note: This feature is currently in preview and may not be available in your tenant.

Quick start script

# Add-SPOHubToHubAssociation — 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
Add-SPOHubToHubAssociation -Source <Guid> -Target <Guid> | Format-List

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

Syntax

Add-SPOHubToHubAssociation [-Source] <Guid> -Target <Guid> [<CommonParameters>]

Parameters (2)

ParameterTypeRequiredWhat it controls
-Source Guid yes HubSiteId of the Source Hub site to be associated with the Target Hub Site.
-Target Guid yes HubSiteId of the Target Hub to associate the source Hub to.

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