PowerTip: Use PowerShell to Find Virtual Machines Using Dynamic Memory

Summary: Use Windows PowerShell to find which virtual machines on Hyper-V is using dynamic memory.

Hey, Scripting Guy! Question How can I tell which of my virtual machines are running with dynamic memory ?

Hey, Scripting Guy! Answer Use the Get-VMMemory cmdlet:

GET-VMMemory -vmname "My Virtual Machine"

(Check the results for "DynamicMemoryEnabled" as "True.")

To check all virtual machines, the dynamic memory status, and the allocated RAM on the Hyper-V host, use:

GET-VM | GET-VMmemory

Comments (3)

  1. Brendan says:

    Had to run Powershell as an Administrator.

  2. Krunch {The Commenter formerly known as K} says:


    this is what i would do instead of having to work for PoSh:

    $vm_name=read-host -prompt “VM name”

    if ($(GET-VMMemory -vmname $vm_name | select DynamicMemoryEnabled) -eq $TRUE){

            write “`n$vm_name is running with dynamic memory`n”


    elseif ($(GET-VMMemory -vmname $vm_name | select DynamicMemoryEnabled) -eq $FALSE){

            write “`n$vm_name is running with static memory`n”



            write “`n`t`tERROR`n”


Skip to main content