Hey, it's Lalithra again. In the last part, we talked about what resource metering is. Now, we’ll get into how to use it with PowerShell.

A quick note: if this is your first foray into PowerShell, here are some resources you may find helpful to go through. First, a couple of posts from the Scripting Guy to give you a good overview: An Introduction and PowerShell and Pipelining. Also, check out the Windows PowerShell for the Busy Admin series of webcasts by Scripting Guy Ed Wilson. Highly recommended.

Let’s get started. First, let’s find the cmdlets we’re looking for.

PS C:\> Get-Command *VM*

This prints out a list of cmdlets with VM in their names. If we look through this list for something related to resource metering, we’ll find the cmdlets we’re looking for.

PS C:\> Get-Command *VMResourceMetering*

If you want more details on a particular cmdlet, use Get-Help.

Now, let’s enable resource metering.

PS C:\> Enable-VMResourceMetering –VMName Greendale-VM

We can see if a virtual machine has resource metering enabled by looking at its properties:

PS C:\> Get-VM –VMName Greendale | Format-Table Name, ResourceMeteringEnabled

--> please see the rest on the blog : http://blogs.technet.com/b/virtualization/archive/2012/08/20/how-to-use-resource-metering-with-powershell.aspx