this is updated version that has fixed some bugs reported

This 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 script will then use to initiate moves based on the calculation that you can see on screen and in generated reports. Also there is a finalReportCombined Excel file (NOT csv) that is purely for your information and only being generated if the script is run from a server that has excel installed like our jump server. Once reporting and calculation is completed script will prompt  you if you want to continue the re-balance, which in this case if you his Y the script will move on and will initiate the move for all the mailboxes to destination databases based on the calculation; OR you can simply hit X to exit and use the reports to decide when you would want to initiate the move at your own time and way. If you continue it will also ask you if you want to move all mailboxes calculated if you chose No then you will be prompted to enter a number for the mailboxes that you want to move. the script then move only number of mailboxes you just entered. 

all you need is run the script there are no parameters to this.

- open a powershell session OR exchange Managemenet shell

- enter FQDN of one of your exchange servers when prompted to establish PsSession in case you are not running this from shell

-enter a network or local path to a folder where the log files will be generated. Make sure the folder has no other csv files in it this is important when/if you have excel installed and cvs reports are being combined. the rest you can simple watch the output on screen as the scrupt is working its calculations. 

This is tested on exchange 2013 and 2016 multi database organization. Let me know if you face any issue and i will work with  you to fix or adjust it if there were any  needed.