Phone: (08) 8269 7311
Mobile: 0411 266 904
Email: adlcheaptv@gmail.com
Address: Shop 1, 269 North East Rd Hampstead Gardens SA 5086
Hi Everyone,
Here is another simple script once again for you, to list devices from Azure AD with a filter on Display Name.
I want the list of devices where their names start with EWR or for that matter it can be anything else, depending on your requirement. Please make sure that Azure AD PowerShell module is installed before running this script.
I am getting four things in the results. DeviceType, AccountEnabled, Operating System and Display Name.
Connect-AzureAD
Write-Output "List of Devices from Azure AD"
Write-Output ""
Write-Output "Device --- Enabled --- Device OS --- Displayname"
$FormatEnumerationLimit = -1
$meetingroomsample = "ewr*"
$develist =Get-AzureADDevice -All $true | where displayname -Like "$meetingroomsample"
foreach ($device in $devicelist)
{
Write-Output ( $device.objecttype + "`t--- " + $device.accountenabled + "`t --- " + $device.deviceostype + "`t --- " + $device.displayname )
}
Output generated like this:
Phone: (08) 8369 2951
Mobile: 0411 266 904
Email: adlcheaptv@gmail.com
Address: Shop 1, 269 North East Rd Hampstead Gardens SA 5086
Licensed
Listed business