I have a program which I run on hundreds of different computers a day, this is sort of like an inventory program. One of the details I'm trying to fetch is the amount of VRAM available to the graphics card.

I'm currently using WMIC to do this, specifically the win32_VideoController path, and the AdapterRAM value. This works great on any computer which has less than 4GB of VRAM (Which most do, but not all)

Recently we got some computers with 1060 & 1080 graphics cards, these have more than 4GB VRAM. Win32_VideoController returns the AdapterRAM value as a data type: uint32, which basically means that it is unable to return anything over 4GB.

I've been looking around online trying to find another way to get the VRAM for the GPU (I have to be able to do it with a command), but can only find people using Win32_VideoController in really old questions/answers.

How can I get the correct amount of VRAM from a computer via command line? I can use a 3rd party program if it is small enough if I have to.

  • On such computers, test if the command wmic.exe PATH Win32_videocontroller GET AdapterRAM doesn't return multiple entries, each one up to 4GB, summing up to the real total.
    – harrymc
    Jul 19, 2019 at 18:15
  • @harrymc It doesn't return multiple values for the same graphics card. In the example I tested it on, it returned 2 different values but that's because it has an onboard AND a graphics card, but adding these up does not equal the correct amount of VRAM from the graphics card. Jul 19, 2019 at 18:25
  • I wish I had enough rep (or could use my rep from SO) to start a bounty on this :/ just 13 views in 2 days Jul 22, 2019 at 12:37
  • My opinion at the moment is that the Windows utilities have not been updated to 64-bit so can't show more than 4GB. I think one has to query the display driver via Windows API for this information.
    – harrymc
    Jul 22, 2019 at 13:19
  • @harrymc Is there any way you know of to do that via command prompt or node.js (Electron)? Jul 22, 2019 at 13:32

1 Answer 1

$qwMemorySize = (Get-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0*" -Name HardwareInformation.qwMemorySize -ErrorAction SilentlyContinue)."HardwareInformation.qwMemorySize"
  • Because the VRAM size also stores in "HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0*" so you can retrive its' value and convert it into GB. The whole code: link
    – farag
    Nov 5, 2019 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .