Grant-SPOHubSiteRights
向用户或启用邮件的安全组授予将其站点与中心站点关联的权限。
语法
Default (默认值)
Grant-SPOHubSiteRights
[-Identity] <SpoHubSitePipeBind>
-Principals <String[]>
-Rights <SPOHubSiteUserRightsClient>
[<CommonParameters>]
说明
将权限应用于一组用户或已启用邮件的安全组。 使用此 cmdlet 可确定谁可以在使用 SharePoint 用户界面时将其网站与中心网站相关联。 中心网站默认为公共站点。 设置权限后,只有指定的组或用户可以将其网站与中心网站相关联。
若要查看哪些用户或组有权访问网站,请使用 Get-SPOHubSite cmdlet。
示例
示例 1
Grant-SPOHubSiteRights https://contoso.sharepoint.com/sites/Marketing
-Principals nestorw@contoso.onmicrosoft.com
-Rights Join
此示例演示如何在虚构的 Contoso 网站) 向用户授予 Nestor (权限,以将其网站与营销中心网站相关联。
参数
-Identity
适用:SharePoint Online
中心网站的 URL。
参数属性
| 类型: | Microsoft.Online.SharePoint.PowerShell.SpoHubSitePipeBind |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | HubSite |
参数集
(All)
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Principals
适用:SharePoint Online
要为其添加权限的一个或多个主体。
参数属性
| 类型: | System.String[] |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Rights
适用:SharePoint Online
始终设置为值 Join。 具有 “加入” 权限的任何用户或组都可以查看和加入中心网站。
参数属性
| 类型: | String |
| 默认值: | None |
| 接受的值: | Join |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。