Set-PnPSiteGroup

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPSiteGroup.md to change this file.

Updates the SharePoint Online owner and permission levels on a group inside a site collection.

Syntax

Set-PnPSiteGroup
   -Identity <String>
   [-Name <String>]
   [-Owner <String>]
   [-PermissionLevelsToAdd <String[]>]
       [-PermissionLevelsToRemove <String[]>]
   [-Site <PipeBind>]

Description

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at Intro to SharePoint Online Management Shell.

Examples

EXAMPLE 1

Set-PnPSiteGroup -Site "https://contoso.sharepoint.com/sites/siteA" -Identity "ProjectViewers" -PermissionLevelsToRemove "Full Control" -PermissionLevelsToAdd "View Only"

Example 1 changes permission level of the ProjectViewers group inside site collection https://contoso.sharepoint.com/sites/siteA from Full Control to View Only.

EXAMPLE 2

Set-PnPSiteGroup -Site "https://contoso.sharepoint.com| -Identity "ProjectViewers" -Owner user@domain.com

Example 2 sets user@domain.com as the owner of the ProjectViewers group.

Parameters

-Identity

Specifies the name of the group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the new name of the group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Owner

Specifies the owner (individual or a security group) of the group to be created.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PermissionLevelsToAdd

Specifies the permission levels to grant to the group.

Note

Permission levels are defined by SharePoint Online administrators from SharePoint Online Administration Center.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PermissionLevelsToRemove

Specifies the permission levels to remove from the group.

Note

Permission levels are defined by SharePoint Online administrators from SharePoint Online Administration Center.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Site

Specifies the site collection the group belongs to. If not defined, the currently connected site will be used.

Type:SitePipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online