Skip to content

larspassic/Get-OnPremMailboxUsage.ps1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Get-OnPremMailboxUsage.ps1

Introduction

This script uses the Get-MailboxStatistics Exchange Management Shell cmdlet to gather vital mailbox usage statistics about a batch of users.

Mailbox type Value from Get-MailboxStatistics Column name in output file
Primary mailbox TotalItemSize PrimaryNormalItemSizeGB
Primary mailbox TotalDeletedItemSize PrimaryRecoverableItemSizeGB
Archive mailbox TotalItemSize ArchiveNormalItemSizeGB
Archive mailbox TotalDeletedItemSize ArchiveRecoverableItemSizeGB

This script converts the string values of mailbox sizes produced by the Get-MailboxStatistics cmdlet, into decimal values (in gigabytes), so that the resulting output file can be quickly sorted.

The script also also creates empty columns so that you can easily plan for quota adjustments, if needed.

Instructions

  1. Populate users.csv with UserPrincipalNames (UPNs) of the current batch of users.
  2. Run the script from the Exchange Management Shell (EMS) on an Exchange server in your environment.
  3. The script will create a csv file named "OnPrem Mailbox Usage MM-DD-YYYY HH_MM.csv" with the necessary data.

Please use the latest release from the "Releases" section on the right-hand side of this page.

Credits

The function Convert-QuotaStringToGB() in this script was inspired by Paul Cunningham (cunninghamp) from his function Convert-QuotaStringToKB() from his script Set-MailboxQuota.ps1.

About

Script to gather mailbox statistics for a batch of users.

Resources

Stars

Watchers

Forks

Packages

No packages published