One of the tools that Microsoft has provided to the community for Office 365 migrations is the Exchange2007MBtoMEU.ps1 PowerShell script.
If you’ve completed a staged Exchange migration to migrate your organization’s Exchange 2007 on-premises mailboxes to Office 365 and you want to manage cloud-based users from your on-premises organization—using Active Directory—you should convert the on-premises mailboxes to mail-enabled users (MEUs).
While using the script on a project I considered that it would be helpful if the script logged the changes that it made when it was converting the mailbox users to mail-enabled users.
With Microsoft's permission I am publishing my modified version of the script. It functions the same way as the original, so you should follow Microsoft's guidance here.
The only significant difference is the log file that is produced by my version of the script. It is simply written to the same folder where the script is running from, and basically contains the same information that the script outputs to the console while it is running.
Download Ex2007MBtoMEU.ps1-Customized from Github.