Many admins are familiar with the problem that size limits have been configured for mailboxes and every now and then there are messages about full mailboxes from users. As an admin, you really only have two options here: either you increase the mailbox size for the user, or you tell the user to clean up and delete old mails.
The first option usually only solves the problem temporarily, because after a certain amount of time the user contacts you again and asks for more storage space. With the second option, it is often too late, because the mailbox is usually already full, so you usually give the user a little more storage space and then ask them to clean it up. How successful the two options are depends more on the user.
In any case, however, you wait for the message from the user complaining about a full mailbox. Unfortunately, Outlook itself is only of limited help here, as it only complains when the limit for the warning is reached. You could approach the user a little more proactively and offer them a little help with tidying up, because it's not just the size of the mailbox that matters (usually only for us admins), but also the number of items per folder.
Folders with more than 100,000 items slow down Outlook noticeably. Users with large mailboxes may not only complain about a lack of storage space, but also about a lack of speed.
I have therefore created a small PowerShell script that displays the mailbox size, the largest folders and the folders with the most items in the mailbox and sends them to the user as an e-mail report. Together with the report, further information can be sent to the user, for example information on the archive system used or instructions on how to use their mailbox.
Here is an example report for one user:
$Group = "Domain Users"
$CountTopFolder = 10
$ReportMailboxSizeInMB = 5000
$SMTPServer = "smtp.domain.tld"
$From = "postfachbericht@domain.tld"
$Subject = "Postfach Übersicht"
Ich denke die meisten Einstellungen sind selbsterklärend. Bei der Variable „$Group“ kann eine Active Directory Gruppe angegeben werden. Der Bericht wird dann nur für Mitglieder dieser Gruppe versendet. Auf diese Weise lassen sich unterschiedlich formatierte Berichte an unterschiedliche Gruppen schicken. Wenn der gleiche Bericht an alle Benutzer verschickt werden soll, kann die Gruppe „Domain Users“ angegeben werden.
I have made the script available on GitHub, you are welcome to participate in the further development:
Perhaps it will help some users to keep their mailboxes a little more organized.
Update 10.12.2022: I have just updated the script on GitHub and fixed a problem where no report was sent. In addition, there is now the option to send the report only for mailboxes above a certain size.