PowerShell ยป Microsoft 365 User Report

PowerShell scripts for Microsoft 365

Get Microsoft 365 Group reports using powershell

The Get-MsolGroup cmdlet gets groups from Azure Active Directory. This cmdlet can be used to return a single group, if you specify the ObjectId parameter, or to search within all groups.

  1.  Get-MsolGroup
  2.  [-UserObjectId <Guid>]
  3.   [-IsAgentRole]
  4.  [-UserPrincipalName <String>>
  5.   [-GroupType <GroupType>>
  6.  [-HasErrorsOnly]
  7.  [-HasLicenseErrorsOnly <Boolean>]
  8.   [-SearchString <String>]
  9.   [-MaxResults <Int32>]
  10.  [-TenantId <Guid>]
  11.  [<CommonParameters>]
Examples

Example 1: Get a group by using an ID

1  Get-MsolGroup -ObjectId af407072-7at6-4b07-a0ca-6634b7396

This script returns the group object that has the specified ID.

 

Example 2: Get all groups

1  Get-MsolGroup

This script returns all the groups of the tenant, up to the default 250 results.

 

Example 3: Get agent groups using user principal name

1  Get-MsolGroup -isAgentRole -UserPrincipalName "johndoe@example.com"

This script returns the agent groups in which the user is a memmber. This only applies for companies that have partner privileges.

Get Microsoft 365 group reports with M365 Manager Plus

As you can see in the examples above, one needs to run multiple scripts to retrieve data based on the requirements. And the PowerShell scripts get longer with the granularity of the data to be fetched.

M365 Manager Plus on the other hand offers built-in reports on Microsoft 365 that can be viewed in a single click. Whatever be the service you need to view reports on, all are available under a single roof.

The categories of group reports provided by M365 Manager Plus include:
  1. General group reports.
  2. Member based reports.
  3. Group type reports.
  4. Group usage reports.
 
Microsoft 365 Group Reports

The highlights of M365 Manager Plus' reports:

  • Advanced filters: Use attribute and condition-based filters to get the data you need without lengthy PowerShell scripts.
  • Reports on historical data: PowerShell cmdlets can only retrieve data that's at least seven days old and no older than 180 days. But M365 Manager Plus reports can fetch all data right from the date of installation.
  • Customizable dashboard: M365 Manager Plus dashboard is customizable. Add reports in graph format to get a quick peek at the mail traffic summary, top email senders and receivers, client device usage, and more. This dashboard can be embedded in any of your web pages to enable constant monitoring.
  • Report scheduler: Reports can be scheduled to be generated at regular intervals to reduce the overhead of generating reports manually.
  • Report export: The reports can be exported to PDF, XLS, HTML, or CSV formats and emailed to the administrator.
  • Secure delegation: Securely delegate the task of report generation to technicians and IT staff without giving them full access to the Microsoft 365 Admin Center.
Related topics: