Get-Mailbox size
Dears; how i can get the mailbox size and limation for all my users in UK; which the UK updated in city faild. Iyad
March 20th, 2010 2:26pm

Get-MailboxServer | get-mailboxstatistics | sort-object TotalItemsize -Descending | ft Displayname,@{ expression={$_.TotalItemSize.Value.ToMb()}},ItemCount What do you mean by limation? http://blog.meigh.eu/2010/02/22/mailbox-size--item-count.aspx
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2010 11:51pm

Hii; thanks for your reply but i want to have this command to get result for only spacific users when the city faild equal UK or Turky limitaion mean the qouta for the mailbox sizeIyad
March 21st, 2010 8:18am

Not all the user properties are returned by the Exchange cmdlets, and I think City is one of them. Email just flat doesn't care what city you live in so Exchange doesn't mess with that attribute in AD. You'll need something else to test for that. The three ways I know of are: 1. Use the [ADSI] / LDAP query method. 2. Use the Quest AD cmdlets. 3. Use the ActiveDirectory module cmdlets from the RSAT tools. #1 is the lowest common denominator. It should work with any version of Powershell or any AD, without requiring and 3rd party software. It's also more work to code. #2 will also work with any version of Powershell or AD, but requires downloading and using 3rd party software, which may or may not be a problem depending on your circumstances, and if you plan on writing scripts to run on other computers in the org. #3 is a MS -provided solution. It comes as a Powershell V2 module, so it requires Powershell V2, and it requires the ADGW service be running on at least one of your DC's. That service ships with Server 2008 R2, and is available for installation on 2008 and 2003 R2 DCs. "Best Practice" is probably #3 if it's possible/practical in your situation. Personally, I have both the Quest and RSAT modules, and use whichever one fits the problem at hand. Either one will do what you're after here. I tend to use the Quest more for ad-hoc cmdline work and "disposable" scripts because I'm used to them, and they tend to be more generous about what they accept as an identity parameter. I try to keep to the RSAT cmdlets for persistent scripts. YMMV. In any case, use one of those to get a collection of users by their City attribute, and then pipe that into your get-mailbox | get-mailboxstatistics sequence.
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2010 8:04pm

but what is the command that i have to run to get the result that i want which is display name and mailbox size and mailbox qouta for spacifc users (like spacific city) Iyad
March 21st, 2010 9:38pm

An example (using the Quest cmdlets_ would be : get-qaduser -city "UK" | get-mailbox | get-mailboxstatistics | sort-object TotalItemsize -Descending | ft Displayname,@{ expression={$_.TotalItemSize.Value.ToMb()}},ItemCount That will get you the display name and mailbox size for all the users who's City is "UK". Add whichever quota fields (warn/prohibitsend/disabled) that you want to the ft to include them in the dislay.
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2010 10:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics