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!
ExchangePowershell

Avatar of undefined
Last Comment
Busbar
Avatar of James
James
Flag of Ireland image

Restart the services for Exchange.
Try

"Set-MailboxDatabase "<servername>\DATABASE" -ProhibitSendReceiveQuota "unlimited" -ProhibitSendQuota 2048MB -IssueWarningQuota 1843MB"
Avatar of Busbar
Busbar
Flag of Egypt image

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
Wean
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Wean
Flag of United Kingdom of Great Britain and Northern Ireland image

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?

Avatar of JuusoConnecta
JuusoConnecta
Flag of Sweden image

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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Exchange
Exchange

Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.

213K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo