Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get HyperV Memory Size without Elevation

I need to determine how much memory is used by a certain Hyper-V virtual machine. I am interested in the Startup memory amount. Get-VMMemory works, but requires elevation.

It is possible to get the same information using the Hyper-V manager GUI without elavation. Is there a way to get the same information programmatically without elevation?

like image 334
zmbq Avatar asked May 19 '26 15:05

zmbq


1 Answers

Option 1

Did you try Exporting the configuration of a virtual machine and then read the required parameters from it? That might be helpful for you.

Option 2

if you can parse the VM config file located at C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines then you can read startup memory amount.

https://www.itprotoday.com/server-virtualization/reading-binary-vmcx-file-windows-2016-hyper-v

You can set the path of virtual machine default folder with this.

like image 156
Kundan Avatar answered May 21 '26 04:05

Kundan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!