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:

Enable-VMResourceMetering -VMName <String[]> 1 2 3 Enable-VMResourceMetering -VMName < String [ ] >

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

Measure-VM -Name <String[]> 1 2 3 Measure-VM -Name < String [ ] >

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

Get-VM -Name <String> | Measure-VM | Select-Object * 1 2 3 Get-VM -Name < String > | Measure-VM | Select-Object *

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 -ResourceMeteringSaveInterval <TimeSpan> 1 2 3 Set -VMHost -ResourceMeteringSaveInterval < TimeSpan >

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

Get-VM -Name <String>| Reset-VMResourceMetering 1 2 3 Get-VM -Name < String > | Reset-VMResourceMetering

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

Get-VM <String> | Disable-VMResourceMetering 1 2 3 Get-VM < String > | Disable-VMResourceMetering

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/

Was this article useful? Support my work!