Connect-Azure : The term 'Connect-Azure' is not recognized as the name of a cmdlet

Boopathi Subramaniam 3,141 Reputation points
2020-10-07T21:40:53.22+00:00

I am trying to get All Azure AD devices with the column values using the below command

Connect into Azure AD

Connect-Azure AD

Download all Azure AD Device

Get-AzureADDevice -All $true | export-csv AADDevice.csv

30775-capture.jpg

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,055 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 92,401 Reputation points MVP
    2020-10-07T21:47:34.633+00:00

    The cmdlet to connect to a Azure AD is: Connect-AzureAD
    There is no space between "Connect-Azure" and "AD"

    So the script should look like this:

    Connect-AzureAD
    Get-AzureADDevice -All $true | export-csv AADDevice.csv
    

    Maybe this is helpful.

    Regards
    Andreas Baumgarten

    (Please don't forget to Accept as answer if the reply is helpful)


3 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 92,401 Reputation points MVP
    2020-10-08T15:46:35.643+00:00

    You could try:

    Get-AzureADDevice -All $true | select Displayname, DeviceTrustType
    
    • ServerAd -> Hybrid Azure AD joined
    • Workplace -> Azure AD registered

    Maybe this is helpful.

    Regards
    Andreas Baumgarten

    (Please don't forget to Accept as answer if the reply is helpful)

    0 comments No comments

  2. Boopathi Subramaniam 3,141 Reputation points
    2020-10-08T16:01:16.497+00:00

    Thanks again.

    31022-capture.jpg

    If I generate the report using powershell command DeviceTrustType is mentioned as ServerAd, AzureAd, Workplace.

    Please help to understand the below
    What is ServerAd referring to? is it HybridAzure Joined or Azure AD joined
    What is AzureAd referring to? is it HybridAzure Joined or Azure AD joined

    0 comments No comments

  3. Andreas Baumgarten 92,401 Reputation points MVP
    2020-10-08T18:21:10.77+00:00
    • ServerAd -> Hybrid Azure AD joined
    • AzureAD -> Azure AD joined
    • Workplace -> Azure AD registered

    Regards
    Andreas Baumgarten