Azure AD preview module is needed for newer advanced features and powershell commands, including Teams related features.

Here are few things to keep in mind while installing this module:

  1. Make sure your current powershell executable is version 3.0 or higher.
  2. You will need to install PowerShellGet – you will be prompted when you install the AzureADPreview module.
  3. The operating system must be supported. See here –
  4. Run as administrator prior to opening the powershell window.
  5. This is most important – make sure you do not have AzureAD module installed, if you do, then uninstall the AzureAD module.

Run a get-module to check if you already have PowershellGet installed. If you do not have it installed the output will look like this –

You can now install the AzureADPreview module. It will first prompt you to install PowerShellGet – select Yes to this prompt.

You can install PowershellGet using the command in the screenshot.

C:\>Install-PackageProvider -Name NuGet -MinimumVersion -Force

When you run the get-Module you will not see AzureADprovider.

You have to do a import module to load the module.

After AzureADPreview build is loaded you can use the following commands to connect to the module.

$AzureAdCred = Get-Credential

Connect-AzureAD -Credential $AzureAdCred