Commands › SharePoint Online

Remove-SPOHubSiteAssociation

SharePoint Online Microsoft.Online.SharePoint.PowerShell Remove-*

Removes a site from its associated hub site.

Quick start script

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

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOHubSiteAssociation
$before | Format-List

# 3. Make the change
Remove-SPOHubSiteAssociation -Site <SpoSitePipeBind>

# 4. Verify and diff
$after = Get-SPOHubSiteAssociation
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Remove-SPOHubSiteAssociation [-Site] <SpoSitePipeBind> [<CommonParameters>]

Parameters (1)

ParameterTypeRequiredWhat it controls
-Site SpoSitePipeBind yes URL of the site to remove from the hub site.

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