Nowadays, Office 365 administrators are required to remember a long command to establish a connection to Office 365 Exchange Online. It’s not easy to remember all the parameters clearly. It’s better to save that command in a Windows PowerShell script. Additionally, it’s worth to check all the prerequisites to help Office 365 administrators to troubleshoot the connection issues.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery