When migrating public folders to Office 365, basic checks need to be performed against the mail-enabled public folder objects to ensure they follow the same rules as the mailboxes (invalid characters or duplication in alias/mailnickname and SMTP attributes).  This script will allow you to generate a report of objects to review where the alias contained invalid characters or the SMTP address didn't pass validation, as well as suggestions to fix.