Get-SCPerformanceData

Gets performance data for host groups, clusters, hosts, and virtual machines.

Description

The Get-SCPerformanceData cmdlet gets performance data for host groups, clusters, hosts, and virtual machines. You can request data for the following performance counters:

- CPU usage
- Memory usage
- Storage IOPS usage
- Network IO usage
- Power Savings

For more information about Get-SCPerformanceData, type: "Get-Help Get-SCPerformanceData -online".

Parameters

PerformanceCounter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the performance counter to use. Valid values are: CPUUsage, MemoryUsage, StorageIOPSUsage, NetworkIOUsage, and PowerSavings.

TimeFrame

Required? false
Accept Pipeline Input? false
Position? named
Specifies the timeframe in which to gather performance data. Valid values are: Hour, Day, Month.

VMHostCluster

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM host cluster object.

PerformanceCounter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the performance counter to use. Valid values are: CPUUsage, MemoryUsage, StorageIOPSUsage, NetworkIOUsage, and PowerSavings.

TimeFrame

Required? false
Accept Pipeline Input? false
Position? named
Specifies the timeframe in which to gather performance data. Valid values are: Hour, Day, Month.

VMHost

Required? false
Accept Pipeline Input? false
Position? named
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts. 

For more information about each type of host, type: "Get-Help Add-SCVMHost -detailed". See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

PerformanceCounter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the performance counter to use. Valid values are: CPUUsage, MemoryUsage, StorageIOPSUsage, NetworkIOUsage, and PowerSavings.

TimeFrame

Required? false
Accept Pipeline Input? false
Position? named
Specifies the timeframe in which to gather performance data. Valid values are: Hour, Day, Month.

VMHostGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies a virtual machine host group object.

PerformanceCounter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the performance counter to use. Valid values are: CPUUsage, MemoryUsage, StorageIOPSUsage, NetworkIOUsage, and PowerSavings.

TimeFrame

Required? false
Accept Pipeline Input? false
Position? named
Specifies the timeframe in which to gather performance data. Valid values are: Hour, Day, Month.

VM

Required? false
Accept Pipeline Input? false
Position? named
Specifies a virtual machine object.

Examples

1. Get performance data for a host group.
PS C:\> $HostGroup = Get-SCVMHostGroup -Name "HostGroup01"
PS C:\> Get-SCPerformanceData -VMHostGroup $HostGroup -PerformanceCounter MemoryUsage  -Timeframe Hour
The first command gets the host group object named HostGroup01 and stores the object in the $HostGroup variable.

The second command gets the memory usage data over the last three hours for HostGroup01.
2. Get performance data for a cluster.
PS C:\> $Cluster = Get-SCVMHostCluster -Name "Cluster01.Contoso.com"
PS C:\> Get-SCPerformanceData -VMHostCluster $Cluster -PerformanceCounter MemoryUsage -Timeframe Day
The first command gets the cluster object named Cluster01 and stores the object in the $Cluster variable.

The second command gets the memory usage data for the last day (24 hours) for Cluster01.
3. Get performance data for a specified host.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> Get-SCPerformanceData -VMHost $VMHost -PerformanceCounter MemoryUsage -Timeframe Month
The first command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The second command gerts the memory usage data for the last month (30 days) for VMHost01.
4. Get performance data for a specified virtual machine.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> Get-SCPerformanceData -VM $VM -PerformanceCounter MemoryUsage -Timeframe Day
The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The second command gerts the memory usage data for the last day (24 hours) for VM01.

See Also