Forum Discussion
Faiza Qadri
Nov 04, 2019Iron Contributor
How to get All Azure AD devices with the column values from the Azure GUI app?
Trying to extract a list (csv or excel) file for all Azure AD devices with the properties displayed on the Azure Portal (see attached picture)
Steve_W_UCCS
Copper Contributor
Thank you for this information. And based on the other responses, I was able to establish counts for each join type:
(Get-AzureADDevice -All $true | Where {$_.DeviceTrustType -eq "ServerAd"}).count
(Get-AzureADDevice -All $true | Where {$_.DeviceTrustType -eq "AzureAd"}).count
(Get-AzureADDevice -All $true | Where {$_.DeviceTrustType -eq "Workplace"}).count
Or combine a couple:
(Get-AzureADDevice -All $true | Where {($_.DeviceTrustType -eq "ServerAd") -or ($_.DeviceTrustType -eq "AzureAd")}).count
Or all Azure AD Devices:
(Get-AzureADDevice -All $true).count
beejus03
Jun 10, 2021Copper Contributor
You can do all this in 1 line using Group-Object.
Get-AzureADDevice | Group-Object DeviceTrustType | Select-Object Count,Name | Sort-Object Count