Add-SPOHubSiteAssociation

Associates a site with a hub site.

Syntax

Add-SPOHubSiteAssociation
   [-Site] <SpoSitePipeBind> `-HubSite <SpoHubSitePipeBind> `[<CommonParameters>]

Description

Use this cmdlet to associate a site with a hub site.

Important

This cmdlet is currently in preview and is subject to change. It is not currently supported for use in production environments.

Examples

Example 1

Add-SPOHubSiteAssociation https://contoso.sharepoint.com/sites/Research `
-HubSite https://contoso.sharepoint.com/sites/Marketing

This example associates the research site with the marketing hub site.

Required Parameters

-HubSite

URL of the hub site.

Type:SpoSitePipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Site

URL of the site to join to the hub site.

Type:SpoSitePipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

Notes

If the site or hub site doesn’t exist, this cmdlet returns a “File not found” error.

If the site is already a hub site, this cmdlet returns a "This site is already a HubSite" error.