Redistribute \ Balance Mailboxes Across Databases Exchange 2013\2016 - Update 1

this is updated version that has fixed some bugs reportedThis script will take the databases in your exchange organization and will calculate and run reports against mailboxes balance and distribution across all databases. there is a final report called FinalReport.csv that the s

 
 
 
 
 
5 Star
(1)
1,098 times
Add to favorites
Exchange
3/7/2018
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Script seems to be moving more mailboxes to one database over the others
    2 Posts | Last post June 11, 2019
    • A colleague of mine and I edited the script slightly so it prompts us and asks if we wish to balance mailboxes in Archive datastores, MBX (user mailboxes), or from one of two physical sites, and so far it works great. What we would like to do is start the script and walk away, but after analyzing it, it determined over 130 mailboxes initially to be redistributed. Unfortunately, the amount of logfiles generated during this activity fills up the logfile drives and we have to continuously add more storage to the logfile drives.
      
      Last night I ran the script but instead of letting it run and move all of the mailboxes it analyzed, I specified 5 mailboxes, which it moved from various locations to MBX02 database. Now this database is critical and down to 6% free space. I'm concerned now that we will have to add more space to this database, when it should be moving mailboxes to other databases with free space. Is there a way to analyze the space in the database itself? How can I be sure that the script wont try and move more mailboxes to MBX02?
    • Yes that is the exact reason i had provided interactive confirmation if you want to move all mailboxes if not then asks you to provide how many you want to move. moving mailboxes creates log files twice as much the size of the mailbox. you need to do this carefully or  you can always adjust the script and add functionality to do space verification as well. If i ever get some time i will certainly work to add space check option to the script.  
  • Can I exclude my 'Archive' databases as available resources?
    3 Posts | Last post April 10, 2019
    • Hello,
      
      Thank you for the script.  I was able to run it with no issues, however when I took a look at the final report, I noticed that it was suggesting to move mailboxes from their current database to an archive database.  How can I exclude this as an option?
      
      Thanks,
      
      Chris
    • Feel free to adjust the script as you wish. You can simply add condition to exclude any database that you would like. I usually make my scripts that i work for my organization available here. i can certainly look into providing that option if i get some free time :) 
    • You can change line 20 of script to below
      $DBs = Get-MailboxDatabase -Status | where-object {$_.Name -ne 'PFDB001'} | Sort Name
      
  • Exclude Mailbox Databases from Redistribution
    2 Posts | Last post February 15, 2019
    • Hi Riaz 
      
      Thank you for this script it helps alot. Can I a suggestion that you add a function to Exclude Mailbox Database that are not in a Database Management Scope for Redistribution.
    • That is a wonderful suggestion, I will do that as soon as i have some time :). I make my scripts available here when I feel it can be useful for you fine folks out there. so feel free to make changes to it to fit your organization needs
  • Databases that IsExcludedFromProvisioning is True, still considered
    1 Posts | Last post November 19, 2018
    • Hello,
      
      I would like to thank you for the script that helps a lot. also if i may, i allowed myself to modify few things to be more automated on my system.
      
      i noticed something while i ran it the first time, it still consider to move mailboxes to databases that has IsExcludedFromProvisioning true.
      
      can you take a look at it ?
      
      thank you
  • Hello, i have a database "test" where i don't want to move user
    2 Posts | Last post August 22, 2018
    • Hello, Thank you for the script. 
      I have a TEST database where i don't create user. It is a non-production database. How can i exclude a database from the balance ?
      Thanks you
    • Just exclude the TEST database from provisioning.
      
      Set-MailboxDatabase -Identity "TEST Mailbox Database" -IsExcludedFromProvisioning $true
  • Will this work for Exc 2010 sp3
    2 Posts | Last post August 15, 2018
    • Can this distribute mailboxes based on storage space ? I want to run it for exc 2010
    • NO this is just a basic one that is not based on storage space. I will work on one that is based on storage space as soon as i have some time
  • Script Errors
    1 Posts | Last post June 07, 2018
    • Export-Csv : Cannot bind argument to parameter 'InputObject' because it is null.
      At C:\Scripts\RedistributeMailboxes.ps1:300 char:24
      +     $MoveInitiatedArray | Export-Csv "$LogPath\MoveInitiated.csv" -NoTypeInformatio ...
      +                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidData: (:) [Export-Csv], ParameterBindingValidationException
          + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ExportCsvCo
         mmand
      
      the ErrorLog.csv says You cannot call a method on a null-valued expression.