Question: I have tried to Stop it and again start using Powershell and through Central Admin. No luck in Powershell and by Central Admin I got Timeout Error with Correlation ID. When checking this in ULS log same error message for Timeout.

At the same time below is error **Details** from **Event Viewer**:

> 
> Insufficient SQL database permissions for user 'Name: domain\AccountName ImpersonationLevel: None' in database 'SharePoint\_Config' on SQL Server instance 'InstanceName'. Additional error information from SQL Server is included below.
> 
> 
> The EXECUTE permission was denied on the object 'proc\_getObject', database 'SharePoint\_Config', schema 'dbo'.
> 
> 
> 

Also the below error for SSA:

> 
> Unable to retrieve topology component health states. This may be because the admin component is not up and running.
> 
> 
>

Answer: 
In CSOM PowerShell, it would look something as mentioned in below code. Modify it as per your list and group names :

```
$SPOCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($userName,$password)

$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$Ctx.Credentials = $SPOCredentials

$web = $Ctx.Web

#load the groups
$groups = $web.SiteGroups
$Ctx.Load($groups)
$Ctx.ExecuteQuery()

# get the SharePoint group
$Group = $groups.GetByName("<Your Visitor Group Name>");
$Ctx.Load($Group);
$Ctx.ExecuteQuery()

$listName = $Ctx.web.Lists.GetByTitle("Custom List")
$Ctx.Load($listName)
$Ctx.ExecuteQuery()

# break inheritance 
$listName.BreakRoleInheritance($true, $false)
$Ctx.ExecuteQuery()

# load the list role assignments
$Ctx.Load($listName.RoleAssignments)
$Ctx.ExecuteQuery()

# remove the visitor group from the list
$listName.RoleAssignments.Groups.Remove($Group)
$Ctx.ExecuteQuery()

```
This code can be used for this.It first breaks inheritance and then remove the specific group

```
$web=Get-SPWeb http://site url
$list = $web.Lists["list/library name"]
$list.BreakRoleInheritance($true)
$web.AllowUnsafeUpdates=$true
[Microsoft.SharePoint.SPRoleAssignmentCollection] $spRoleAssignments=$list.RoleAssignments
for([int] $a=$spRoleAssignments.Count-1; $a -ge 0;$a--)
{
   if($spRoleAssignments[$a].Member.Name -eq "groupName")
   {
      $spRoleAssignments.Remove($a);
   }
}

```