0

A subsite has an AD group associated with libraries and folders, several areas have broken inheritance. A user is added to the AD group but the user cannot access the SharePoint resource. When I try adding the AD group to SharePoint it is unrecognised. I think the AD group has been deleted and SharePoint still associates the group to the resources.

I could try to create the AD group again but dont think this will work as it probably uses an unique identifier.

I think my only option is to find all occurrences of the group in site collection and replace with a new group, the permissions would be full control. Are there any free tools to do this and or PowerShell scripts available for this ?

Thanks in advance

0

You can get all Groups in a Site Collection Using PowerShell

 if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)

   {
        Add-PSSnapin "Microsoft.SharePoint.PowerShell"

   }

  $SPFile = ".\GetGroupInformation.txt"

  $SPSiteUrl = Read-Host "Enter the Url of the Site Collection "

   $SPSite = Get-SPSite $SPSiteUrl -ErrorAction SilentlyContinue


  if($SPSite -ne $null){
     $SPWebCollection = $SPSite.AllWebs
     foreach($SPWeb in $SPWebCollection){
     Write-Output $SPWeb.Title "contains the following groups"| Out-File $SPFile -append
     Write-Output "========================"| Out-File $SPFile -append
     foreach($SPGroup in $SPWeb.Groups){
     Write-Output $SPGroup.Name| Out-File $SPFile -append
     }
     Write-Output "========================"| Out-File $SPFile -append
     }
     }
     else
     {
     Write-Host "Requested Site Could Not be found" -ForegroundColor DarkRed
     }

Please check out the following articles for help:

https://technet.microsoft.com/en-us/library/cc262261.aspx

https://technet.microsoft.com/en-us/library/cc783530(v=ws.10).aspx

https://technet.microsoft.com/en-us/library/cc754344(v=ws.11).aspx

1
  • this is not what i'm asking. I know the group name and need to find what items (folders, Libraries, items) the group has been assigned to within the Site Collection. So need to iterate SC items to discover this. Sep 6 '17 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.