You are currently offline, waiting for your internet to reconnect

"The term <cmdlet name> is not recognized" error when you try to run Azure Active Directory for Windows PowerShell cmdlets

PROBLEM
When you try to run Microsoft Azure Active Directory Module for Windows PowerShell cmdlets, you receive the following error message: 
The term <cmdlet name> is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

For example, you might see the following similiar message.

The term 'Connect-MsolService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:20
+ Connect-MsolService <<<<
+ CategoryInfo : ObjectNotFound: (Connect-MsolService:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
CAUSE
This issue can occur if the Azure Active Directory Module for Windows PowerShell isn't loaded correctly.
SOLUTION
To resolve this issue, follow these steps.
  1. Install the Azure Active Directory Module for Windows PowerShell on the computer (if it isn't already installed). To install the Azure Active Directory Module for Windows PowerShell, go to the following Microsoft website:
  2. Click Start, point to All Programs, click Windows Azure Active Directory, and then click Windows Azure Active Directory Module for Windows PowerShell.
  3. At the Windows PowerShell command prompt, type get-Module, and then press Enter.
  4. In the output, check that the MSOnline module is present. The output should look similiar to the following:
    Module Type Name Exported Commands
    -------------- -------- ----------------
    Binary MSOnline {Add-MsolRoleMember, Remove-MsolContact...
Note If the MSOnline module isn't present, use Windows PowerShell to import the MSOnline module. To do this, follow these steps:
  1. Connect to Exchange Online by using remote PowerShell. For more info about how to do this, go to the following Microsoft website:
  2. Type the following cmdlet, and then press Enter:
    Import-Module MSOnline
MORE INFORMATION
Still need help? Go to the Office 365 Community website or the Azure Active Directory Forums website.
Properties

Article ID: 2669552 - Last Review: 12/12/2014 09:47:00 - Revision: 16.0

Microsoft Azure cloud services, Microsoft Azure Active Directory, Microsoft Office 365, Microsoft Intune, CRM Online via Office 365 E Plans, Microsoft Azure Recovery Services, Office 365 Identity Management

  • o365 o365e o365p o365m o365a o365022013 KB2669552
Feedback