external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Set permissions
Set-PnPWebPermission -Group <GroupPipeBind>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Set-PnPWebPermission -User <String>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Set-PnPWebPermission -Identity <WebPipeBind>
-Group <GroupPipeBind>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Set-PnPWebPermission -Identity <WebPipeBind>
-User <String>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Set-PnPWebPermission -Url <String>
-Group <GroupPipeBind>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Set-PnPWebPermission -Url <String>
-User <String>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Sets web permissions
PS:> Set-PnPWebPermission -Url projectA -User '[email protected]' -AddRole 'Contribute'
Adds the 'Contribute' permission to the user '[email protected]' for a web, specified by its site relative url
PS:> Set-PnPWebPermission -Identity 5fecaf67-6b9e-4691-a0ff-518fc9839aa0 -User '[email protected]' -RemoveRole 'Contribute'
Removes the 'Contribute' permission to the user '[email protected]' for a web, specified by its ID
The role that must be assigned to the group or user
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Type: GroupPipeBind
Parameter Sets: Group
Required: True
Position: Named
Accept pipeline input: False
Identity/Id/Web object
Type: WebPipeBind
Parameter Sets: GroupByWebIdentity
Required: True
Position: Named
Accept pipeline input: True
The role that must be removed from the group or user
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The site relative url of the web, e.g. 'Subweb1'
Type: String
Parameter Sets: GroupByWebUrl
Required: True
Position: Named
Accept pipeline input: False
Type: String
Parameter Sets: User
Required: True
Position: Named
Accept pipeline input: False
Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
Type: WebPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False