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.
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.
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)
$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).
Exchange Administrator of 115k mailbox environment
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.