How to count number of licenses required for auditing a Microsoft Office 365 tenant?

This article applies to Netwrix Auditor 8.0 and above. For your convenience, Netwrix provides the shell script that allows you to figure out a total count of active user mailboxes in your Microsoft Office 365 organization.
Email It to Me Print this Page
Question How to count number of licenses required for auditing a Microsoft Office 365 tenant?
Answer In Microsoft Office 365, you can create different types of mail accounts for different purposes. However, Netwrix Auditor requires purchasing licenses only for Mailbox accounts; there is no charge for accounts of any other types:
  • Mailbox—requires license
  • Group—free
  • Resource—free
  • Contact—free
  • Shared—free
To determine the actual number of licenses you need to purchase from Netwrix, do one of the following, depending on your Office 365 account type.
For Non-MFA enabled account:
  1. Download ZIP file with the shell script provided by Netwrix and extract it. This script counts the number of mailbox accounts in your Office 365 tenant.
Note: You can run the script on any computer where Windows PowerShell is installed. The computer must be connected to the Internet.
  1. Run the Windows PowerShell as Administrator and then invoke the countO365_licenses.ps1 script.
  2. Enter your Office 365 account credentials when prompted and click OK.
  3. When the script completes, you will see a number of mailbox accounts for which you need to purchase licenses:

    User-added image

For MFA-enabled account
  1. Connect to Exchange Online as described in the Microsoft article.
  2. Execute the following commands:
$userMailboxes = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited
  1. The displayed number represents for how many mailbox accounts you need to purchase licenses.

Was this information helpful?