Skip to content

Commit 709aaae

Browse files
authored
Updated to show ethernetMacAddress (#128)
The value for ethernetMacAddress was blank. Updated the code to reflect the ethernetMacAddress.
1 parent 05e19a6 commit 709aaae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ManagedDevices/ManagedDevices_Hardware_Get.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,13 @@ if($Devices){
333333
Write-Host "Device found:" $Device.deviceName -ForegroundColor Yellow
334334
Write-Host
335335

336-
$uri = "https://graph.microsoft.com/beta/deviceManagement/manageddevices('$DeviceID')?`$select=hardwareinformation,iccid,udid"
336+
$uri = "https://graph.microsoft.com/beta/deviceManagement/manageddevices('$DeviceID')?`$select=hardwareinformation,iccid,udid,ethernetMacAddress"
337337

338338
$DeviceInfo = (Invoke-RestMethod -Uri $uri -Headers $authToken -Method Get)
339339

340-
$DeviceNoHardware = $Device | select * -ExcludeProperty hardwareInformation,deviceActionResults,userId,imei,manufacturer,model,isSupervised,isEncrypted,serialNumber,meid,subscriberCarrier,iccid,udid
340+
$DeviceNoHardware = $Device | select * -ExcludeProperty hardwareInformation,deviceActionResults,userId,imei,manufacturer,model,isSupervised,isEncrypted,serialNumber,meid,subscriberCarrier,iccid,udid,ethernetMacAddress
341341
$HardwareExcludes = $DeviceInfo.hardwareInformation | select * -ExcludeProperty sharedDeviceCachedUsers,phoneNumber
342-
$OtherDeviceInfo = $DeviceInfo | select iccid,udid
342+
$OtherDeviceInfo = $DeviceInfo | select iccid,udid,ethernetMacAddress
343343

344344
$Object = New-Object System.Object
345345

@@ -382,4 +382,4 @@ else {
382382
write-host "No Intune Managed Devices found..." -f green
383383
Write-Host
384384

385-
}
385+
}

0 commit comments

Comments
 (0)