

At the end, you will have a text file looking like this: Depending of the size of you farm, it shouldn't take too long, and you should see progress of every site being scanned on the screen. Afterwards, open SharePoint Management Shell as an Administrator, and run the script. This will make sure that you won't have any access denied when you go through each and every site collection in your farm. Second, in the Central Administration, give yourself "Full Control" in the Web Application User Policy.

Write-Host "Going into SiteCollection $siteurl"įirst of all, change the $logfile variable to a folder that exists to make sure the logs work. Write-Host "Starting to look in $webappUrl" Write-Host "Starting Group Script inventory"

$logfile = "C:\ADGroupInventory\grouplist.txt" At a client recently, I was tasked to create an inventory of all the Active Directory Groups that give access to a SharePoint site! I built it mostly from scratch, so here it is as well as some explanations to help you use it: The Script:
