If you want to track the use of a virtual machine in your Hyper-v environment. This blog post may interest you.

Resource metering uses PowerShell cmdlets to track various performance metrics for individuals VMs, such as:

  • CPU utilization
  • Average/Minimum/Maximum memory usage
  • Inbound/Outbound network traffic
  • Disk space utilization

To use the resource metering, you must first enable it for the specific virtual machine that you want to monitor. You can enable it by using the Enable-VMResourceMetering cmdlet with the following syntax:

After you enable it, you can display a statistical report at any time by using the Measure-VM cmdlet with the following syntax:

Resource Metering

If you want to get an extended list of VM metrics, using the Measure-VM cmdlet with the following syntax:

Measure-VM

For default, the local Hyper-V host to save data that tracks resource consumption every hour. You can not decrease this range, but you can increase it by using the Set-VMHost cmdlet with the following syntax:

Set-VMHost

To resets the resource utilization data collected by Hyper-V resource metering, using the Reset-VMResourceMetering cmdlet with the following syntax:

Finally, but not least, to disable resource metering, you should use the Disable-VMResourceMetering cmdlet with the following syntax:

If you want to know more about Hyper-V Resource Metering, check out this link:https://blogs.technet.microsoft.com/virtualization/2012/08/16/introduction-to-resource-metering/