Adding an Issue Warning Based on Prohibit Send Quota
Description- This script is used when you would like to add an issue warning based on a prohibit send quota for a batch of mailboxes without needing to specify what it should be for each mailbox since they have different prohibit send quotas. This script pulls the names of target mailboxes from a .txt file and applies an issue warning 5MB less than the prohibit send quota.
Issue
You want to add an issue warning quota to a batch of mailboxes but you don’t want to do the tedious task of modifying each mailbox one at a time.
Resolution
1. Add target mailbox names one per line in notepad and save the file as list.txt on the C: drive
2. Copy the text below and paste it into notepad, then save as SetIssueWarning.ps1
#Target mailbox import file
$users = get-content “c:\list.txt”
$Mailboxes = @()
#For each loop to each target mailbox
Foreach ($user in $users)
{
#Get mailbox
$Mailbox = Get-Mailbox $user
#Issue warning difference set to 5MB in bytes
$WarningDifference = 5242880
#Get prohibit send quota on mailbox
$ProhibitSendQuota = $Mailbox.ProhibitSendQuota
#Calculate the issue warning to be assigned
$NewIssueWarningQuota = $ProhibitSendQuota – $WarningDifference
#Set issue warning based on formula above
Set-Mailbox -Identity $user -UseDatabaseQuotaDefaults $False -IssueWarningQuota $NewIssueWarningQuota
$Mailboxes += $Mailbox
}
3. Open PowerShell and run SetIssueWarning.ps1
4. To increase or decrease the difference between the prohibit send quota and the desired issue warning quota, simply change the value of $WarningDifference (value in bytes).
Douglas Spear
Exchange Administrator of 115k mailbox environment
Team @MSExchangeGuru
Keywords: Set mailbox size limit based on current mailbox size, how to setup mailbox size limit based on mailbox size, Mailbox size limit script Exchange 2010.
June 29th, 2013 at 3:41 pm
[…] Adding an Issue Warning Based on Prohibit Send Quota – […]
June 29th, 2013 at 3:48 pm
[…] Adding an Issue Warning Based on Prohibit Send Quota – […]
January 21st, 2014 at 1:55 pm
This is exactly what i was looking for.
Thanks so much