You have chosen to delete too many site groups at once


I have a list with 3000 users permission and I need to delete them, but when I select the root checkbox

and tried to delete the all, I got the following error message:

You have chosen to delete too many site groups at once. Select fewer site groups and try again.

Solution

I used PowerShell to delete them 😉

Below is the script…

$web=Get-SPWeb http://dev:2000/

$list=$web.Lists[“MyList”]

foreach($acc in $web.RoleAssignments)

{

try

{

$account = $web.EnsureUser($acc.Member.LoginName)

$list.RoleAssignments.Remove($account)

}

catch

{

Write-Host $acc.Member.LoginName

}

}

$list.Update()

Advertisements

One thought on “You have chosen to delete too many site groups at once

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s