Commands › SharePoint Online

Unregister-SPOHubSite

SharePoint Online Microsoft.Online.SharePoint.PowerShell Unregister-*

Disables the hub site feature on a site.

Quick start script

# Unregister-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
Unregister-SPOHubSite -Identity <SpoHubSitePipeBind> | Format-List

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

Syntax

Unregister-SPOHubSite [-Identity] <SpoHubSitePipeBind> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Force SwitchParameter Whether to disable the hub site feature without prompting for confirmation.
-Identity SpoHubSitePipeBind yes Guid based identifier or URL of the site to disable the hub site feature. If hub site has been already deleted, you will need to use a Guid based identifier to remove the site from the list of hub sites.
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

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