PowerShell: Connect to your O365 Tenant and services

So one of the most common things to do once you've starting consuming Office 365 is to use PowerShell to manage it. MS has a great KB on how to do this but I don't really want to type the commands in every time so I just tossed them all into a script file and added a few variables like the tenant name so that I don't have to create the URLs each time I connect.

Here's the code that I use to get you started, go ahead modify it as needed for your situation.





The code is also in my GitHub:
https://github.com/mikecessna/Office365Scripts/blob/master/O365Connect.ps1

Here's the MS KB article that explains the whole process for each service., if you haven't already done so make sure to install all the necessary software listed or the script won't run:
https://technet.microsoft.com/en-us/library/dn568015.aspx?f=255&MSPPError=-2147217396
 
I updated the code to have a -HybridSfB switch so that the users with a hybrid Skype install can connect to the tenant.