How to add new permission to a SharePoint group using Powershell in SharePoint 2010/2013/2016?

Hello SharePointers,

Below is the powershell script to add new permisison to  a SharePoint group using Powershell in SharePoint 2010/2013/2016.
$web = Get-SPWeb http://mysharepoint/sites/
$group = $web.Groups[“Emp Docs”]
$role = $web.RoleDefinitions[“Full Control”]

$RoleAssignment = New-Object Microsoft.SharePoint.SPRoleAssignment($group)
$RoleAssignment.RoleDefinitionBindings.Add($role)

$web.RoleAssignments.Add($RoleAssignment)
$web.Update()
$web.Dispose()

Happy SharePointing 🙂

Leave a Reply

Your email address will not be published.