locked
Exch2k7 spk3 - How to use the cmd-let 'Get-Mailbox' filtered by ExtendedAttribute1 ? RRS feed

  • Question

  • Hi,

    I was planning to use this cmd-let filtered by 'ExtendedAttribute1' value and then use the result to set the Quota limits.

    * We have a custommer with a lot mailboxes and the databases are 'mixed', so in that case we are unable to set the quota directly to entire database.

    >>>> Can anyone help me? Or share other strategies?

     

    Get-Mailbox: Exchange 2007 Help

    http://technet.microsoft.com/en-us/library/bb123685(EXCHG.80).aspx


    tks, Renato P
    Wednesday, September 28, 2011 2:00 PM

Answers

  • Do you already have extensionattribute1 populated with a value? If so then yes you can use that.

    [PS] C:\temp>Get-Mailbox -ResultSize Unlimited | Where {$_.CustomAttribute1 -eq
     "Blah"} |set-mailbox -IssueWarningQuota 975MB -ProhibitSendQuota 1700MB -P
    rohibitSendReceiveQuota 1900MB


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
    • Marked as answer by jr3151006 Wednesday, September 28, 2011 5:07 PM
    Wednesday, September 28, 2011 4:41 PM

All replies

  • This is better, you export all your mailboxes with their size. Copy the output to excel. Sort by mb size in Excel. Then you need to break up your users into sets. So if you plan to have 4 quotas then you will break up your spreadsheet into four sets of users. Then you run import-csv with each sets of users with their corresponding quota limits.

    [PS] C:\temp>get-mailbox |Get-Mailboxstatistics | select-object displayname, totalitemsize,@{ expression={$_.TotalItemSize.Value.ToKB()}},ItemCount |export-csv c:\temp\mbreport.csv

    Sort the users and break your list of users into sets based on your quota into each csv file, after that you run import-csv for each set of users and set the quota. If you need help with this part let me know but you should be able to figure it out if you have a little shell experience.

     
    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
    • Edited by Jamestechman Wednesday, September 28, 2011 2:44 PM
    Wednesday, September 28, 2011 2:40 PM
  • Hi Jamestechman,

    tks for quick reply. I will chek your option and also wait other ideas.

     


    tks, Renato P
    • Edited by jr3151006 Wednesday, September 28, 2011 4:04 PM english correction
    Wednesday, September 28, 2011 3:03 PM
  • If it´s impossible (until now) to filter by 'Extended Attribute1', I´m using filtered by OU like the following sample.

     

    Get-Mailbox -OrganizationalUnit "OU=USERS,OU=COMPANY,DC=DOMAIN,DC=LOCAL" | Set-Mailbox

     -IssueWarningQuota 975MB -ProhibitSendQuota 1700MB -ProhibitSendReceiveQuota 1900MB


    tks, Renato P
    Wednesday, September 28, 2011 4:15 PM
  • Do you already have extensionattribute1 populated with a value? If so then yes you can use that.

    [PS] C:\temp>Get-Mailbox -ResultSize Unlimited | Where {$_.CustomAttribute1 -eq
     "Blah"} |set-mailbox -IssueWarningQuota 975MB -ProhibitSendQuota 1700MB -P
    rohibitSendReceiveQuota 1900MB


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
    • Marked as answer by jr3151006 Wednesday, September 28, 2011 5:07 PM
    Wednesday, September 28, 2011 4:41 PM
  • Tks Jamestechman, works perfect! You are my hero!
    tks, Renato P
    Wednesday, September 28, 2011 6:08 PM