Here is a quick reference on how to connect to Azure, Azure AD, Office 365, and Teams with PowerShell.  All the modules and steps can become cumbersome for Admins so I have compiled them into one easy place.

Connect to Azure with PowerShell:

Connecting to the Azure platform to create and manage resources it is highly recommended to use the cloud shell:

https://shell.azure.com/powershell

Connect to Azure Active Directory (AzureAD) with PowerShell:

Be aware there are currently 2 module versions available.  MSOnline is the older version and  AzureAD is the new version 2 that Microsoft recommends.  AzureAD should eventually fully replace the MSOnline module.

Connect to MSOnline:

Connect to AzureAD:

Connect to Office 365 with PowerShell:

Connect to Microsoft Teams with PowerShell:

Note: At the time of this blog post Microsoft has combined the Skype Online PowerShell module into MicrosoftTeams module.  However, I was encountering issues such as:

The term ‘Get-CsOnlineUser’ is not recognized as the name of a cmdlet, function, script file, or operable program.

The term ‘Get-CsOnlineTelephoneNumber’ is not recognized as the name of a cmdlet, function, script file, or operable program.

Looking into this I found that the Skype Online commands are only added if you get the preview version of the MicrosoftTeams module with this command: