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.
||How to count number of licenses required for auditing a Microsoft Office 365 tenant?
||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:
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.
- Mailbox—requires license
For Non-MFA enabled account:
- 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.
For MFA-enabled account
- Run the Windows PowerShell as Administrator and then invoke the countO365_licenses.ps1 script.
- Enter your Office 365 account credentials when prompted and click OK.
When the script completes, you will see a number of mailbox accounts for which you need to purchase licenses:
- Connect to Exchange Online as described in the Microsoft article.
- Execute the following commands:
$userMailboxes = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited
- The displayed number represents for how many mailbox accounts you need to purchase licenses.