Set-SPOSiteGroup
更新 SharePoint Online 所有者和网站集内的组的权限级别。
语法
Set-SPOSiteGroup
-Identity <String>
[-Name <String>]
[-Owner <String>]
[-PermissionLevelsToAdd <String[]>]
[-PermissionLevelsToRemove <String[]>]
-Site <SpoSitePipeBind>
[<CommonParameters>]
说明
你必须既是 SharePointOnline 管理员或全局管理员又是网站集管理员才能运行 Set-SPOSiteGroup
cmdlet。
有关适用于 SharePoint Online 的 Windows PowerShell 的权限和最新信息,请参阅在线文档简介 SharePoint Online 命令行管理程序的简介。
示例
-----------------------示例 1-----------------------------
Set-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/siteA -Identity "ProjectViewers" -PermissionLevelsToRemove "Full Control" -PermissionLevelsToAdd "View Only"
示例 1 将网站集 https://contoso.sharepoint.com/sites/siteA 内 ProjectViewers 组的权限级别从“完全控制”更改为“仅查看”。
-----------------------示例 2-----------------------------
Set-SPOSiteGroup -Site https://contoso.sharepoint.com -Identity "ProjectViewers" -Owner Melissa.kerr@contoso.com
示例 2 将设置为 Melissa.kerr@contoso.com ProjectViewers 组的所有者。
参数
-Identity
指定组的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Name
指定组的新名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Owner
指定要创建的组所有者(个人或安全组)。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-PermissionLevelsToAdd
指定要授予组的权限级别。
注意
权限级别由 SharePoint Online 管理中心的 SharePoint Online 管理员定义。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-PermissionLevelsToRemove
指定要从组中删除的权限级别。
注意
权限级别由 SharePoint Online 管理中心的 SharePoint Online 管理员定义。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Site
指定组所属的网站集。
Type: | SpoSitePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |