Set-SPOSiteGroup

更新 SharePoint Online 所有者和网站集内的组的权限级别。

语法

Default (默认值)

Set-SPOSiteGroup
    -Site <SpoSitePipeBind>
    -Identity <String>
    [-Name <String>]
    [-PermissionLevelsToAdd <String[]>]
    [-PermissionLevelsToRemove <String[]>]
    [-Owner <String>]
    [<CommonParameters>]

说明

您必须至少是 SharePoint Online 管理员,并且必须是网站集管理员才能运行 cmdlet Set-SPOSiteGroup

有关适用于 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

适用:SharePoint Online

指定组的名称。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

适用:SharePoint Online

指定组的新名称。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Owner

适用:SharePoint Online

指定要创建的组所有者(个人或安全组)。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PermissionLevelsToAdd

适用:SharePoint Online

指定要授予组的权限级别。

注意

权限级别由 SharePoint Online 管理中心的 SharePoint Online 管理员定义。

参数属性

类型:

System.String[]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PermissionLevelsToRemove

适用:SharePoint Online

指定要从组中删除的权限级别。

注意

权限级别由 SharePoint Online 管理中心的 SharePoint Online 管理员定义。

参数属性

类型:

System.String[]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Site

适用:SharePoint Online

指定组所属的网站集。

参数属性

类型:Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
默认值:None
支持通配符: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