PowerShell Logo Small

Enable-VMResourceMetering



This is the built-in help made by Microsoft for the command 'Enable-VMResourceMetering', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Collects resource utilization data for a virtual machine or resource pool.

SYNTAX


Enable-VMResourceMetering [-VMName] <String[]> [-ComputerName <String[]>] [<CommonParameters>]
Enable-VMResourceMetering [-ResourcePoolName] <String> [[-ResourcePoolType] <VMResourcePoolType>] [-ComputerName <String[]>] [<CommonParameters>]
Enable-VMResourceMetering [-VM] <VirtualMachine[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Enable-VMResourceMetering cmdlet starts collecting resource utilization data for a virtual machine or resource pool.


You can use the Measure-VM or Measure-VMResourcePool cmdlet to obtain this data.


If resource metering is enabled but no NetworkAdapterAcls are configured, Hyper-V configures them to measure total network traffic. To measure network traffic through an IP
range, configure the NetworkAdapterAcls for the IP range before calling this cmdlet. (See Add-VMNetworkAdapterAcl for more information.)



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=306840
Measure-VM
Measure-VMResourcePool
Disable-VMResourceMetering

REMARKS

<

Examples


Example 1

PS C:\> Enable-VMResourceMetering –VMName TestVM



This example starts collecting resource utilization data on a virtual machine named TestVM.




Example 2

PS C:\> Get-VM TestVM | Enable-VMResourceMetering
PS C:\> Get-VM TestVM | Format-List Name,ResourceMeteringEnabled



This example starts collecting resource utilization data on a resource pool named TestResourcePool. (You can determine whether resource metering is enabled for a resource
pool by querying its ResourceMeteringEnabled property.)




Example 3

PS C:\> Enable-VMResourceMetering –ResourcePoolName TestResourcePool –ResourcePoolType Memory
PS C:\> Get-VMResourcePool -Name TestResourcePool –ResourcePoolType Memory | Format-List Name,ResourceMeteringEnabled



This example uses two commands that show resource metering being enabled and then obtain the data. The first command starts collecting resource utilization data for a memory
resource pool named TestResourcePool. (You can determine whether resource metering is enabled for a resource pool by querying its ResourceMeteringEnabled property.) The
second command retrieves the data in and formats it as a list.




Example 4

PS C:\> Enable-VMResourceMetering –Name TestResourcePool –ResourcePoolType @("Processor","VHD","Ethernet","Memory")



This example begins collecting resource utilization data on multiple resource pools with the name TestResourcePool.