Connect-AzureAD command not working

Anonymous
2017-08-09T12:16:24+00:00

I am following the steps in this article: Restore a deleted Office 365 Group.

I have finished the steps under "Install the preview version of the Azure Active Directory Module for Windows PowerShell", but when I try to run this command "Connect-AzureAD", it does not prompt me to sign in. instead, it returns an error stating that the term cannot be found, please see the picture below:

any help is appreciated.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2017-08-09T14:59:22+00:00

    Hi Arya_2017,

    I tested on my lab and I can login to Azure AD.

    Please run the scripts in PowerShell which is used to check if the AzureADPreview module is installed or not:

    if (Get-Module -ListAvailable -Name AzureADPreview) {

    Write-Host "Module exists"

    } else {

    Write-Host "Module does not exist"

    }

    Please note that you need to run the PowerShell as an administrator.

    Thanks,

    Brook

    8 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-08-10T05:09:13+00:00

    thanks Brook.

    I run the script you provide, it returns "Module does not exist".

    I try to install the module using the script: Install-Module AzureADPreview, then use the script to check the result, the same error.

    it seems I cannot install the AzureADPreview module, how to fix this?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-08-10T15:49:16+00:00

    Hi Arya,

    Please also try to run Windows PowerShell, Windows PowerShell ISE, Windows PowerShell ISE (x86) as an Administrator to see if you can install the Azure AD module.

    Thanks,

    Brook

    0 comments No comments
  3. Anonymous
    2017-08-13T08:52:11+00:00

    Hi Arya,

    Any updates?

    Thanks,

    Brook

    0 comments No comments