Real-time insights on group membership, type, and scope can help Active Directory (AD) administrators manage group objects better. Many administrators use Microsoft's PowerShell technology to run basic queries and pull detailed information. Below are some key PowerShell scripts and commands for generating AD group reports.
Get-ADGroupMember -Identity administrators
Get-ADGroup -Filter 'GroupCategory -eq 0' -Properties *
Get-ADGroup -Filter 'GroupCategory -eq 0' -Properties * Get-msoluser
Limitation: Can not generate with a single cmdlet. A script has to be written for retrieving members and then consecutively retrieving groups for the result. After comparing the DN to eliminate duplicates the same process has to be repeated for each member of the selected group.