UPDATE 2018-04-18: Converted to keying on UPN for all mailbox identities to resolve some issues encountered with ambiguous mailbox identities. Also added outputting some text files to make undo and redo easier for IMAP and POP disablement.

UPDATE 2018-04-06: Added some uniqueness verifications to attempt to resolve some strange count results.

UPDATE 2018-04-03: Improved memory efficiency by eliminating unneeded properties from variable storage, removing some large variables once they are no longer needed, and utlizing more pipelining over variable storage. This should help reduce Powershell memory usage issues in large environments with high mailbox counts.

UPDATE 2018-03-28: Added better error handling around connecting each module to the cloud services. Also now handles an EXO PSSession already being present.

 

This script is currently in BETA!  I welcome ideas and sample code for improvement suggestions.  It definitely focuses on utility over refinement, so there is definitely room for improvement.

DISCLAIMER: This script is provided with no warranty expressed or implied by Microsoft. Though I am a Microsoft employee, this is not supported through Microsoft official support channels. I will do my best to answer questions and solve issues that are posted here in the Q&A. 

This script helps admins assess the Modern Authentication settings for an Office 365 tenant and provide guidance for addressing the findings. It looks at:

Note: This script will require you to login multiple times, so that it can connect the EXO, SPO, and S4BO powershell modules to the tenant.  The multiple logins does not mean that you have entered your password incorrectly. To make this easier, the script will put the first username you use into the clipboard, so you can paste it into the subsequent login prompts.