PowerShell scripts for Microsoft 365

Your download is in progress and it will be complete in just a few seconds! If you face any issues, download manually here

Thank you for registering with ManageEngine.

We will send the download link to the registered email ID shortly.

Manage and Secure Microsoft 365 with M365 Manager Plus

  • By clicking 'Download 30-day free trial' you agree to processing of personal data according to the Privacy Policy.

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>]


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, XLSX, 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:

Why businesses choose M365 Manager Plus?

What our customers say

  • We can now effectively reconcile which licenses we are using in the organization and assign the cost to the business unit. We were also able to identify a number of license changes that could be put in place that reduced our total Microsoft 365 spending.

    Timothy Ransom
    Group IT/IS manager at The Eclipse Group, United Arab Emirates

  • M365 Manager Plus is valuable to our future business and, most importantly, it allows me to keep improving the level of service we provide.

    IT infrastructure manager
    Sunstar Suisse S.A.

  • Our firm purchased ManageEngine M365 Manager Plus to help us protect our business from email-borne cyberthreats. We are absolutely satisfied with the features and ease of use. It has surpassed our expectations.

    Insurance agent
    Security and risk management Gartner review

A holistic Microsoft 365 administration solution

One-stop solution for all your
Microsoft 365 administration needs!

Download now