Share via

Pulling Total Physical Memory for Intune Enrolled Devices

Damon Maranya 36 Reputation points
2022-08-12T20:42:53.83+00:00

I have been asked to determine how many of our current fleet of Intune enrolled Windows 10 devices have 4GB of physical memory.

As far as I can tell the best way to get this information without going device by device in MEM is through Microsoft Graph. I can successfully pull all enrolled devices with a device query using Powershell. But the physicalMemoryInBytes attribute shows as 0 for all devices. Regardless of the value displayed on the device's Intune record, or the actual memory in the device.

I can run a targeted query in which I select the attributes I want to see (https://graph.microsoft.com/beta/deviceManagement/manageddevices('<Intune Device ID>')?$select=id,hardwareinformation,physicalMemoryInBytes), and that returns a correct value. But that means iterating through all of the devices one at a time. Which is fine, except I'm just not familiar enough with the syntax used by the Graph API to figure out how to set that query up.

Does anyone have a better way to pull the physicalMemoryInBytes attribute from Intune enrolled devices, or failing that, some insight into how I would build the foreach loop I would need to iterate through the enrolled devices? Alternately does anyone have a good resource on learning to use MS Graph? Today is literally the first time I've touched it.

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Intune | Other
Microsoft Security | Microsoft Graph

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.