Link to home
Create AccountLog in
Avatar of Wean
WeanFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Exchange Mailbox Limits

Im having a problem Setting the mailbox limits for a database.

I use the folowing script


Get-MailboxDatabase "DATABASE" | Set-MailboxDatabase -ProhibitSendReceiveQuota "unlimited" -ProhibitSendQuota 2048MB -IssueWarningQuota 1843MB

Open in new window



and then run the folowing to get a report

Get-mailboxdatabase -identity "DATABASE" | get-mailbox | foreach {

$MailboxInfo = Get-Mailbox -identity $_.displayName
$MailboxStat = Get-MailboxStatistics -identity $_.displayName

Add-Member -InputObject $_ noteProperty UseDefault $MailboxInfo.UseDatabaseQuotaDefaults
Add-Member -InputObject $_ noteProperty WarningQuota $MailboxInfo.IssueWarningQuota
Add-Member -InputObject $_ noteProperty SendQuota $MailboxInfo.ProhibitSendQuota
Add-Member -InputObject $_ noteProperty SendRecieveQutoa $MailboxInfo.ProhibitSendReceiveQuota

Add-Member -InputObject $_ noteProperty QuotaStatus $MailboxStat.StorageLimitStatus
Add-Member -InputObject $_ noteProperty TotalItems $MailboxStat.ItemCount
Add-Member -InputObject $_ noteProperty TotalSizeMB $MailboxStat.TotalItemSize.Value.ToMB()
Add-Member -InputObject $_ noteProperty DeleteItems $MailboxStat.DeletedItemCount
Add-Member -InputObject $_ noteProperty DeletedSizeMB $MailboxStat.TotalDeletedItemSize.Value.ToMB() -PassThru
Add-Member -InputObject $_ noteProperty MailboxDatabase $MailboxStat.database

} | Export-Csv -Path "D:\DATABASE.csv"

Open in new window


and the results show that the "WarningQuota" "SendQuota" and "SendRecieveQutoa" havent changed, i would expect them all to be set as the first script.

Am i doing something wrong or is it that damn gnome in the server!
Avatar of James
James
Flag of Ireland image

Restart the services for Exchange.
Try

"Set-MailboxDatabase "<servername>\DATABASE" -ProhibitSendReceiveQuota "unlimited" -ProhibitSendQuota 2048MB -IssueWarningQuota 1843MB"
you are setting the levels on the DB not the mailboxes so mailboxes limits will not change and when calculated it will be based on the DB where they are located.
so this is correct
Avatar of Wean

ASKER

Thanks for all your help The_Kirschi and JBond2010 and busbar.

busbar, that sound's like the problem. Im going to give it a go now.
Avatar of Wean

ASKER

How do i modify the script below to change the

I tried to combine the two together to update for each mailbox in a database but i think im horrible wrong.

Get-mailboxdatabase -identity "DATABASE" | get-mailbox | foreach { Set-MailboxDatabase -ProhibitSendReceiveQuota "unlimited" -ProhibitSendQuota 2048MB -IssueWarningQuota 1843MB }

Am I on the right path or far off?

Get-mailboxdatabase -identity "DATABASE" | set-mailbox | foreach { Set-MailboxDatabase -ProhibitSendReceiveQuota "unlimited" -ProhibitSendQuota 2048MB -IssueWarningQuota 1843MB }

after piping change the "get-mailbox" to "set-mailbox"
ASKER CERTIFIED SOLUTION
Avatar of Busbar
Busbar
Flag of Egypt image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer