You can simply export users from Microsoft 365 admin center by going to Groups --> Active Groups --> Click "Export groups" button as shown in the image below:
But in order to export Azure Active Directory groups with specific information, please refer to the instructions below,
1. Connect Msol Service using the cmdlet below,
Connect-MsolService
Note: Please install the MSOnline service using the cmdlet "Install-Module MSOnline" if not already and you can refer to Connect-MsolService (MSOnline) | Microsoft Docs for more info.
2. Run the Get-MsolGroup cmdlet and export the results in a CSV file as shown below
Get-MsolGroup -All | Select-Object ObjectId, DisplayName, GroupType, EmailAddress, ManagedBy, Description | Export-Csv C:\GroupsInfo.csv
Additionally, you can add more output parameters to the list mentioned above and the best way to do so is to refer to the excel sheet downloaded from the Microsoft 365 Admin Center.
Note: Please enter the output parameters without any spaces and refer to Get-MsolGroup (MSOnline) | Microsoft Docs for more info.
Comments
0 comments
Please sign in to leave a comment.