As we migrate our mailboxes over from Exchange 2003, to Exchange 2007, we've been asked numerous times for reports detailing the time/size of each mailbox moved. Lucky for us, Exchange does a wonderful job documenting the move (when you use move-mailbox to do so). Unfortunately for most humans, this data is in XML format. Readable, just not user friendly.
Hence, I created this nifty script, to read the XML files, then export a summary (in HTML and CSV format) of the moves. To get it running in your environment, you'll need to:
1. Modify the "$MigrationFolder" variable to point to the folder where the XML reports are located. We've put them on the D: drive.
Line 10: $MigrationFolder = "D:\Program Files\Microsoft\Exchange Server\Logging\MigrationLogs\"
2. Tweak the script for your displayname naming standard. We use an @ sign followed by the user's department (i.e. "Woodford, Eric@IT"). I've added an option to filter by the department entry. You may want to completely remove this filter.
Line 23: $totalMoved += $moved | ?{$_.result.errorcode -eq 0} |?{$_.mailboxname -match $dept}
3. Tweak the location of the reports.
Line 33 & 35: $filepath = "c:\support\scripts\migrationReport-"+$dept.replace("@","")+"-"+$todaystr
If you run the report without any commandline options, it will export all mailbox moves completed today for any department. Run it with date then department and it will output everything after the date, for the specific department. Hmm, since it is filtering on the mailbox name, department could be interchangeable for a specific mailbox username.
Comments
Failed User Script
Hi
I got script working. I have only small issues. It shows me which users are moved successfully.
How i can make script to show me which users failed during migration?
Dan
Post new comment