Register-SPOHubSite
对网站启用中心网站功能,让它成为中心网站。 有关详细信息,请访问 SharePoint 中心网站概述。
语法
Default (默认值)
Register-SPOHubSite
[-Site] <SpoSitePipeBind>
-Principals <String[]>
[<CommonParameters>]
说明
使用此 cmdlet 将现有网站集注册为中心网站。
重要
每个租户最多可创建 2000 个中心站点,与一个中心站点关联的网站集数量“不受限制”。
注意
更改最多可能需要 2-4 小时才能显示。
示例
示例 1
Register-SPOHubSite https://contoso.sharepoint.com/sites/Marketing -Principals $null
此示例在 Contoso 上将市场营销网站注册为中心网站,而不为其设置任何主体。
参数
-Principals
适用:SharePoint Online
指定一个或多个委托人 (用户或组) 被授予对指定 HubSite 的权限。 可用于筛选可以将站点与此中心站点关联的人员。
参数属性
| 类型: | System.String[] |
| 默认值: | 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”错误。
如果网站已与另一个中心站点关联,此 cmdlet 将返回“此站点当前与 HubSites 关联”错误。 需要先运行 Remove-SPOHubSiteAssociation cmdlet,然后才能将网站设为中心网站。