In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzureADDevice PowerShell command with examples of how to use this command.
Table of Contents
Get-AzureADDevice
This is an excellent Azure PowerShell cmdlet that can help you get the details of the lists of devices from your Azure Active Directory.
Syntax
Find the below syntax of the Get-AzureADDevice PowerShell command.
Get-AzureADDeviceLet’s discuss a few examples of how to use the Get-AzureADDevice PowerShell command.
Example-1:
Get-AzureADDeviceAfter executing the above PowerShell command, I got the below-expected output.
PS C:\WINDOWS\system32> Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
get-azureaddevice
Account Environment TenantId TenantDomai
n
------- ----------- -------- -----------
fewlines4biju@hotmail.com AzureCloud 5d9d690a-0310-474d-ae8b-42df2d549228 fewlines...
DeletionTimestamp :
ObjectId : a34dad44-3e2f-4aff-a84b-3027bad701b4
ObjectType : Device
AccountEnabled : True
AlternativeSecurityIds : {class AlternativeSecurityId {
IdentityProvider:
Key: System.Byte[]
Type: 2
}
}
ApproximateLastLogonTimeStamp :
ComplianceExpiryTime :
DeviceId : 5ba7f2b6-a1cd-417f-b894-aa90d948d8f6
DeviceMetadata :
DeviceObjectVersion :
DeviceOSType : OS/2
DeviceOSVersion : 9.4
DevicePhysicalIds : {}
DeviceTrustType :
DirSyncEnabled :
DisplayName : TsInfo device
IsCompliant :
IsManaged :
LastDirSyncTime :
ProfileType :
SystemLabels : {}
You can see the same output in the below screenshot.

Example-2:
Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
Get-AzureADDevice -Filter "startswith(DeviceOSType,'OS/2')"After executing the above command, I got the expected output, as shown in the screenshot below.

Example-3:
You can also execute the below PowerShell command to get a specific device based on the specified criteria using the Get-AzureADDevice -SearchString PowerShell command.
Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
Get-AzureADDevice -SearchString "TsInfo device2"After executing the above command, I got the output as expected. Check out the screenshot below for your reference.

You can use the New-AzureADDevice PowerShell command to create a new device in your Azure Active Directory.
Get-AzureADDevice PowerShell – Video Tutorial
You can also check out the video tutorial below on the Get-AzureADDevice command.
Final Thoughts
Well, In this Azure PowerShell article, we discussed the syntax and usage of the Get-AzureADDevice command with an example of how to use this command. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
