search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Hyper-V Server 2012 Host CPU monitoring with PowerShell
Posted in Windows Powershell, Windows Server | No Comment | 3,053 views | 09/07/2013 17:37

This will give you host and guest CPU usage on your Hyper-V host.

1
2
3
4
5
6
7
$ClusterNode = "Host01"
While ($True)
{
	$ChildCPU = ((Get-Counter -ComputerName $ClusterNode -Counter "\Hyper-V Hypervisor Logical Processor(_Total)\% Total Run Time" -MaxSamples 3).CounterSamples | Measure-Object CookedValue -Max).Maximum
	$ParentCPU = ((Get-Counter -ComputerName $ClusterNode -Counter "\Processor Information(_Total)\% Processor Time" -MaxSamples 3).CounterSamples | Measure-Object CookedValue -Max).Maximum
	Start-Sleep 5
}

You should change $ClusterNode to start monitoring.



Leave a Reply