Need to deliver or better understand the AD groups associated with your SharePoint site collection? Try this:
$SPWebApp = Get-SPWebApplication http://sitecollectionURLhere/
foreach ($SPSite in $SPWebApp.Sites)
{
write-host -foregroundcolor green "Working on Site Collection: " + $SPsite.RootWeb.Title
$SiteURL = $SPsite.RootWeb.URL
$ADgroup=Get-SPUser -Web $SiteURL -Limit ALL | Where { $_.IsDomainGroup }
}
echo $ADgroup | Export-Csv "C:\Temp\FileNameGoesHere.csv"
PS1 download is here: https://1drv.ms/u/s!Ag4C3w6EUQIggowvfXrE0Z3tfWKJeA
Like this:
Like Loading...
Related
Published by Jared Meredith
Executive Director of Enterprise Architecture, Project Management Office, and Strategic Governance with extensive background in helping business partners envision and design enterprise architecture that drives amazing experiences with high availability. I love to take current problems or technical challenges while bringing people together to align solutions and strategy to provide the best technical path for how we can work to achieve goals with technology.
View all posts by Jared Meredith