Monitor Virtual Machines Performance Using Hyper-V PowerShell

In this article I’ll how you can monitor a Hyper-V Virtual machine using PowerShell directly from the host Hyper-V PowerShell module.

This article follows our new cover of Hyper-V on Windows Server 2016 and our article about 9 Things You Need To Know About Hyper-V 2016.

With the upcoming release of Nano Server and Windows Containers Hyper-V will take a big part In both releases.

Before I can start monitoring my Hyper-V Virtual Machine using the cmdlet below which will enable monitoring on all VMs

Get-VM | Enable-VMResourceMetering

If you just need to enable it to one VM use:

Enable-VMResourceMetering VMname

To monitor a VM type:

Measure-VM "Vmname"

To monitor all VMs type:

Get-VM | Measure-VM

To reset counters type:

Restart-VMresourceMetering Vmname

You can also reset counters on all VM using:

Get-VM |Restart-VMresourceMetering