Categories: PowerShell

PowerShell – How to find users without default quota set on Microsoft Exchange

During Exchange 2010 times for one of our Clients some users had special quota set for multiple users that was different than what was default settings in the database. Upon migration to Exchange 2013 and with no space problems the default quota was expanded for everyone making sure everyone has enough space to hold everything. However since some users had their personal quota set that required a fix. Since Exchange 2010, Exchange 2013 and lately Exchange 2016 has that covered with simple PowerShell it's very easy to do this in one go, rather than going one by one thrue Exchange Admin Center (ECP) interface.

Solution

To find users that have non-default quota settings on their mailboxes one can use this very simple PowerShell command

get-mailbox -ResultSize Unlimited | where {$_.UseDatabaseQuotaDefaults -ne $true}

To fix all those users one can simply expand on that command

get-mailbox -ResultSize Unlimited | where {$_.UseDatabaseQuotaDefaults -ne $true} | Set-Mailbox -UseDatabaseQuotaDefaults $true

After executing this and rerunning check again there should be no data returned.

get-mailbox -ResultSize Unlimited | where {$_.UseDatabaseQuotaDefaults -ne $true}

This post was last modified on 1 kwietnia, 2016 18:35

Przemyslaw Klys

System Architect with over 14 years of experience in the IT field. Skilled, among others, in Active Directory, Microsoft Exchange and Office 365. Profoundly interested in PowerShell. Software geek.

Share
Published by
Przemyslaw Klys

Recent Posts

Active Directory Replication Summary to your Email or Microsoft Teams

Active Directory replication is a critical process that ensures the consistent and up-to-date state of…

2 tygodnie ago

Syncing Global Address List (GAL) to personal contacts and between Office 365 tenants with PowerShell

Hey there! Today, I wanted to introduce you to one of the small but excellent…

5 miesięcy ago

Active Directory Health Check using Microsoft Entra Connect Health Service

Active Directory (AD) is crucial in managing identities and resources within an organization. Ensuring its…

7 miesięcy ago

Seamless HTML Report Creation: Harness the Power of Markdown with PSWriteHTML PowerShell Module

In today's digital age, the ability to create compelling and informative HTML reports and documents…

8 miesięcy ago

How to Efficiently Remove Comments from Your PowerShell Script

As part of my daily development, I create lots of code that I subsequently comment…

8 miesięcy ago

Unlocking PowerShell Magic: Different Approach to Creating ‘Empty’ PSCustomObjects

Today I saw an article from Christian Ritter, "PowerShell: Creating an "empty" PSCustomObject" on X…

9 miesięcy ago