A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Hi Yash Vora
In theory, -ResultSize Unlimited should return all mailboxes in your organization.
However, since your environment contains more than 1 million mailboxes, using -ResultSize Unlimited alone may not be practical, as it can be impacted by disk capacity and throughput limitations.
With that in mind, I would recommend applying additional filters based on specific attributes such as:
- Department
- RecipientTypeDetails
This approach can help narrow down the results and make the query more manageable. You can then export each filtered result into separate CSV files for easier review and future reference.
For example, you may add the following after your PowerShell command Get-EXOCASMailbox:
| Export-Csv -Path "C:\Temp\EXOCASMailbox.csv" -NoTypeInformation -Encoding UTF
For more detailed guidance, you may refer to: Export-Csv (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Learn
I hope this information provides helpful direction and adds further clarity.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.