Add-SPOHubSiteAssociation
将网站与中心网站关联。
语法
Default (默认值)
Add-SPOHubSiteAssociation
[-Site] <SpoSitePipeBind>
-HubSite <SpoHubSitePipeBind>
[<CommonParameters>]
说明
使用此 cmdlet 将网站与中心网站关联。
示例
示例 1
Add-SPOHubSiteAssociation https://contoso.sharepoint.com/sites/Research -HubSite https://contoso.sharepoint.com/sites/Marketing
此示例将研究网站与营销中心网站相关联。
参数
-HubSite
适用:SharePoint Online
中心网站的 URL 或站点 ID。
参数属性
| 类型: | Microsoft.Online.SharePoint.PowerShell.SpoHubSitePipeBind |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Site
适用:SharePoint Online
要加入中心网站的网站的 URL。
参数属性
| 类型: | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输入
Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
输出
System.Object
备注
如果站点或中心网站不存在,此 cmdlet 将返回“找不到文件”错误。
如果站点已是中心站点,则此 cmdlet 返回“此站点已是 HubSite”错误。
在多地理位置情况下,分配跨地理位置的中心时,必须将中心站点的站点 ID 传递给 HubSite 参数,因为 URL 会失败。