Use PowerShell to Update Item Permssions in SharePoint

What if you want to update the item permissions on every item in a list or library, BUT you don’t want to trigger an associated workflow?


Request came in to add a new SharePoint group to all the items in a library.  Options were to update EVERY item in the library and let the workflow update the permissions, update the items ONE AT A TIME…


Use PowerShell to update item permissions and not stress the server(s).

# add powershell snapin
$web = Get-SPWeb -Identity ""
$list = $web.Lists.TryGetList("Taco Time")
$group = "Taco Makers"
$PermissionLevel = "Read"

#get site group and setup permission/role
$group = $web.Groups[$group]
$roleAssignment = new-object Microsoft.SharePoint.SPRoleAssignment($group)
$roleDefinition = $web.RoleDefinitions[$PermissionLevel];

if ($list -ne $null)
	foreach ($item in $list.Items)
		if ($item.HasUniqueRoleAssignments -eq $False)
                if ($web.SiteGroups[$group] -ne $null)
			Write-Host "Group is not valid."

2 thoughts on “Use PowerShell to Update Item Permssions in SharePoint

  1. Jen, try this:

    $user = “domain\UserAccount”

    Then update:
    $group = $web.SiteGroups[$group]
    $group = $web.SiteUsers[$user]

Leave a Reply

Your email address will not be published. Required fields are marked *