*** If you download it and like the script, please rate it. ***


This pack of ten PowerShell scripts will generate csv reports of ALL groups and their members for -

Local AD and Exchange On-premises, including dynamic distribution groups
Azure AD, and Exchange Online, including dynamic distribution groups
Office 365 Groups (Unified Groups).

I have also included scripts to query and export all the groups a single user is a member of in-
Local AD and Azure AD. 

Updated 07 July 2018 to version 1-1 (only one script updated)

- Added new group attribute to the script for Unified Groups membership script (Office 365 Groups) -
- GroupIsCreatedByMicrosoftTeams - to identify Office 365 groups created by Microsoft Teams

 

--- Azure AD and Exchange Online Scripts ---

All Azure AD Groups and their members
- Export a csv of all groups in Azure AD and their members (including synced groups via Hybrid)


Single user group membership 
- Export a csv of all groups a single user is a member of, including Unified Groups (Office 365 groups)


All Exchange Online Distribution Groups and their members
- Export a csv of all Exchange Online distribution groups and their members


All Exchange Online Dynamic Distribution Groups and their members
- Export a csv of all Exchange Online dynamic distribution groups and their members


All Unified Groups and their members (Office 365 Groups)
- Export a csv of all Unified groups and their members (Office 365 Groups)


--- Local AD and Exchange On-premises Scripts ---

All Local AD Groups and their members - Scoped to a particular OU and the sub-OUs
- Export a csv of all groups in Local AD and their members


All Local AD Groups and their members
- Export a csv of all groups in Local AD and their members


Single User group membership
- Export a csv of all groups a single user is a member of


All Local Exchange Distribution Groups and their members
- Export a csv of all Local Exchange distribution groups and their members


All Local Exchange Dynamic Distribution Groups and their members
- Export a csv of all Local Exchange dynamic distribution groups and their members

 

===============================================================

 

Support articles for the Group Membership Pack

- Part 1 - Scripts for Azure AD and Exchange Online Group Membership - Link
- Part 2 - Scripts for Local AD and Exchange Group Membership - Link

Related article -

Identify which Office 365 groups have been created by Microsoft Teams and their members - Link

 

===============================================================

Updated 07 July 2018 to version 1-1

Revision - 
- Only one file updated - O365-EXO-AllUnifiedGroupsAndRecipients-v1-0 - now version 1-1
- Added new group attribute - GroupIsCreatedByMicrosoftTeams - to identify Office 365 groups created by Microsoft Teams

 

Update Details -
To identify groups that have been created by Microsoft Teams, I have added the new column - GroupIsCreatedByMicrosoftTeams.
Office 365 groups (Unified Groups) created by users in OWA or Planner do not have a value for this attribute.
Groups created by Microsoft Teams do have a value for this attribute.
I have tested this on two separate tenancies and they both have the same result, the attribute value starts with 'ExchangeProvisioningFlags:' but have different numbers at the end.

The attribute value that is captured and exported in the script is - ProvisioningOption -