Skip to content

Commit

Permalink
Updated to show ethernetMacAddress (#128)
Browse files Browse the repository at this point in the history
The value for ethernetMacAddress was blank. Updated the code to reflect the ethernetMacAddress.
  • Loading branch information
amitghod authored Mar 24, 2020
1 parent 05e19a6 commit 709aaae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ManagedDevices/ManagedDevices_Hardware_Get.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@ if($Devices){
Write-Host "Device found:" $Device.deviceName -ForegroundColor Yellow
Write-Host

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

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

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

$Object = New-Object System.Object

Expand Down Expand Up @@ -382,4 +382,4 @@ else {
write-host "No Intune Managed Devices found..." -f green
Write-Host

}
}

0 comments on commit 709aaae

Please sign in to comment.