Hyper-V in Windows 11 includes built-in telemetry and chargeback tracking known as Resource Metering. Unlike transient performance monitoring tools like Windows Task Manager or Performance Monitor (which record volatile snapshot metrics), Resource Metering continuously tracks cumulative resource consumption over time—including average CPU utilisation, minimum and maximum RAM usage, allocated disk capacity, and granular inbound and outbound network transfer. For developers profiling guest application workloads, IT administrators auditing development sandboxes, and labs evaluating virtual machine footprint, Windows PowerShell provides native cmdlets such as Enable-VMResourceMetering and Measure-VM to extract detailed consumption telemetry with zero external agent overhead.
How Hyper-V Resource Metering Operates
Resource Metering is implemented directly inside the Hyper-V hypervisor and Virtual Machine Management Service (VMMS). When enabled on a virtual machine, the hypervisor accumulates metrics continuously in host memory across reboots until an administrator explicitly issues a reset command:
- CPU Utilization: Aggregates average processing frequency in megahertz (MHz) across all virtual processors.
- Memory Consumption: Measures minimum, maximum, and average dynamic memory allocation (RAM) assigned to the guest.
- Disk Storage Capacity: Measures total physical host storage consumed by primary virtual hard disks (VHD/VHDX) and snapshot differentials.
- Network Traffic Accounting: Tracks cumulative inbound and outbound traffic in megabytes (MB) across all attached virtual network adapters.
Enabling Resource Metering on Virtual Machines
To begin collecting historical metrics, open Windows PowerShell as an Administrator. By default, resource metering is disabled on newly provisioned virtual machines to minimise telemetry overhead.
To enable metering on a specific virtual machine:
Enable-VMResourceMetering -VMName "Win11-DevBox"
To enable resource metering across all virtual machines hosted on your Windows 11 workstation:
Get-VM | Enable-VMResourceMetering
To verify which virtual machines have resource metering active:
Get-VM | Select-Object Name, State, ResourceMeteringEnabled
Collecting and Analysing VM Resource Consumption via Measure-VM
Once enabled, use the Measure-VM cmdlet to retrieve real-time accumulated metrics from the hypervisor.
To query basic resource metrics for a single guest:
Measure-VM -VMName "Win11-DevBox"
To format and inspect specific consumption attributes cleanly in PowerShell:
Measure-VM -VMName "Win11-DevBox" | Select-Object `
VMName,
@{Name="AvgCPU(MHz)"; Expression={$_.AverageProcessorUsage}},
@{Name="MinRAM(MB)"; Expression={$_.MinMemoryUsage}},
@{Name="MaxRAM(MB)"; Expression={$_.MaxMemoryUsage}},
@{Name="AvgRAM(MB)"; Expression={$_.AverageMemoryUsage}},
@{Name="DiskAllocation(GB)"; Expression={[math]::Round($_.TotalDiskAllocation / 1GB, 2)}},
MeteringDuration
Key telemetry fields include:
- AverageProcessorUsage: Mean CPU frequency in MHz consumed by the guest over the measured duration.
- MinMemoryUsage / MaxMemoryUsage: Dynamic memory extremes, useful for sizing minimum and maximum dynamic memory limits.
- TotalDiskAllocation: Total bytes consumed on physical host volumes, including active VHDX files and checkpoints.
- MeteringDuration: Total time interval (TimeSpan) over which the telemetry has accumulated.
Configuring Granular Network Metering Pools
By default, Measure-VM aggregates all network traffic across virtual network adapters. However, administrators often need to differentiate between local intranet traffic and external internet data transfers. Hyper-V supports Resource Pools with packet filters to categorise network consumption.
To create a network metering pool for tracking outbound public internet traffic:
# Create a network metering pool
New-VMResourcePool -Name "InternetTraffic" -ResourcePoolType Network
# Add an ACL rule matching external non-RFC1918 traffic
Add-VMNetworkAdapterAcl -VMName "Win11-DevBox" -Action Meter -Direction Outbound -RemoteIPAddress "0.0.0.0/0"
Add-VMNetworkAdapterAcl -VMName "Win11-DevBox" -Action Meter -Direction Inbound -RemoteIPAddress "0.0.0.0/0"
To inspect network adapter specific metering metrics:
(Measure-VM -VMName "Win11-DevBox").NetworkMeteredData | Select-Object Direction, RemoteIPAddress, TotalTraffic
Exporting Resource Telemetry for Reporting
To generate periodic resource consumption reports for multiple virtual machines and export the results to CSV for capacity planning:
Get-VM | Where-Object { $_.ResourceMeteringEnabled -eq $true } | Measure-VM | Select-Object `
VMName,
AverageProcessorUsage,
AverageMemoryUsage,
MaxMemoryUsage,
@{Name="TotalDiskGB"; Expression={[math]::Round($_.TotalDiskAllocation / 1GB, 2)}},
MeteringDuration |
Export-Csv -Path "C:\Hyper-V\Reports\ResourceUsageReport.csv" -NoTypeInformation
Resetting or Disabling Resource Metering
To reset the telemetry counters back to zero—such as when beginning a new testing cycle or monthly accounting interval—use the Reset-VMResourceMetering cmdlet:
# Reset counters for a single virtual machine
Reset-VMResourceMetering -VMName "Win11-DevBox"
# Reset counters across all running VMs
Get-VM | Reset-VMResourceMetering
To completely stop metric collection and release associated memory buffers:
Disable-VMResourceMetering -VMName "Win11-DevBox"
Utilising Hyper-V Resource Metering in Windows 11 equips developers and systems engineers with authoritative, lightweight hardware profiling directly from native PowerShell commands.