Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set-mailbox like powershell cmdlets with the Exchange 2003 Server 1

Status
Not open for further replies.

gasca

Programmer
Apr 2, 2003
22
ES
Hi,

i work as an exchange administrator and we have to set limits on per user
mailbox (not for each storage group because this gave us a lot of database
wasted space problems) and I started to use Powershell on my machine to get
some reports.

I know that Exchange 2007 comes with Exchange Management Shell and you can
do this natively...

There's no problem on going on every AD user account properties, but the
challenge is that the number of mailboxes is high (around 2900) so doing this
is a though task..

Is there any third pary cmdlet to SET exchange 2003 properties or any WMI
method or anything else I can do to avoid doing manually?

Thanks in advance,
Salvador.
 
If you have or can install the AD cmdlets from Quest Software ( free even!) it turns out to be pretty easy. Those values are actually stored as AD attributes for each account. They are as follows:
mDBUseDefaults: Boolean, the "Use mailbox store defaults" checkbox
MDBStorageQuota: Integer, the "Issue warning at" box
mDBOverQuotaLimit: Integer, "Prohibit send at" box
mDBOverHardQuotaLimit: Integer, "Prohibit send and receive at" box

So for instance to turn on individual quotas for a user and set the limits to 390MB (warning), 400MB (no send), and 500MB (no send/receive) is:
Code:
set-qaduser -Identity domain\username -ObjectAttributes @{mDBUseDefaults=$False;mDB
StorageQuota=390000;mDBOverQuotaLimit=400000;mDBOverHardQuotaLimit=500000}

It would be easy to have this process a CSV or some loop to set all 2900 accounts.
See the following blog post from Dmitry Sotnikov,
 
Probably, using the [ADSI] type accelerator, yes. The Quest cmdlets just make it much easier.
 
gasca - You mention that you've used PowerShell to gather reports.

Your needs are a little ambiguous. If you have a 2007 system with PowerShell, you can use PowerShell to make changes to E2k3 users, since the data is all in AD:

Code:
Set-Mailbox "testuser1" -ProhibitSendQuota 30MB -ProhibitSendReceiveQuota 40MB -IssueWarningQuota 20MB -UseDatabaseRetentionDefaults $False

or the opposite:
Code:
Set-Mailbox "testuser1" -UseDatabaseRetentionDefaults $True

However, if you're needing to make changes globally, and you don't have access to PowerShell, you can use these scripts that my buddy Bharat published:

SCRIPT: Show mailbox limits
SCRIPT: Reset Mailbox Limits
SCRIPT: Show mailbox quotas (including Store & Policy quotas)

If this isn't what you're looking for, please clarify what it is you're attempting to do, and what you mean by "wasted space"

Pat Richard MVP
Plan for performance, and capacity takes care of itself. Plan for capacity, and suffer poor performance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top