set the mailbox size quotas based on group membership in Exchange

Problem:

You would to set the mailbox size quotas based on group membership.

Solution:

Use the following script to set the Mailbox quota’s:

$g = (get-group BM-MBX-Unlimited).members
foreach ($m in $g) {
set-mailbox $m.distinguishedname -UseDatabaseQuotaDefaults $false -IssueWarningQuota “UNLIMITED” -ProhibitSendReceiveQuota  “UNLIMITED” -ProhibitSendQuota “UNLIMITED”
}

Save the script as .PS1 file and execute it using the Exchange Management Shell, when you want it as scheduled task use the following command to execute the script:

Exchange 2007: PowerShell.exe -PSConsoleFile “C:\Program Files\Microsoft\Exchange Server\Bin\ExShell.psc1” -Command “. ‘<path to script>\<YourScript>.ps1′”
Exchange 2010: PowerShell.exe -PSConsoleFile “C:\Program Files\Microsoft\Exchange Server\V14\Bin\ExShell.psc1” -Command “. ‘<path to script>\<YourScript>.ps1′”
Exchange 2013: PowerShell.exe -PSConsoleFile “C:\Program Files\Microsoft\Exchange Server\V15\Bin\ExShell.psc1” -Command “. ‘<path to script>\<YourScript>.ps1′”

Posted in: Exchange 2007, Exchange 2010, Exchange 2013, Microsoft

banner