top of page
  • Writer's pictureAbhijit Tiwari

How to get List of Groups in Office 365 and its Members in a consolidated output using Powershell

Recently I happened to come across a situation where a customer requested to get group membership of all groups in a consolidated output. There is a limitation with the Command Get-MSOLGroupMember i.e. It only gets the output of one group at a time. Hence, I created the following script to get a consolidated output. Hope it helps you all. Following is the script and E.g of the Output:-

The Above Code Is a Single Line Code. Make sure that when you copy the above , and all of it is in a single line.

You also need to download the Azure AD Powershell Module before running the above commands. Download Link:-

1,038 views0 comments
bottom of page