Get-SCPerformanceData

Get-SCPerformanceData

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

Syntax

Parameter Set: AllVM
Get-SCPerformanceData -AllVM -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: AllVMNetworkGateway
Get-SCPerformanceData -AllVMNetworkGateway -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: AllVNIC
Get-SCPerformanceData -AllVNIC -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: Cluster
Get-SCPerformanceData [-VMHostCluster] <HostCluster> -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} -TimeFrame <String> {Hour | Day | Month} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: Host
Get-SCPerformanceData [-VMHost] <Host> -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} -TimeFrame <String> {Hour | Day | Month} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: HostGroup
Get-SCPerformanceData [-VMHostGroup] <HostGroup> -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} -TimeFrame <String> {Hour | Day | Month} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VM
Get-SCPerformanceData [-VM] <VM> -PerformanceCounter <String> {CPUUsage | MemoryUsage | StorageIOPSUsage | NetworkIOUsage | NetworkIOSent | NetworkIOReceived | PowerSavings} -TimeFrame <String> {Hour | Day | Month} [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed 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

Parameters

-AllVM

Indicates that data for all virtual machines is returned.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AllVMNetworkGateway

Indicates that data for all network gateways is returned.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AllVNIC

Indicates that data for all virtual network adapters is returned.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PerformanceCounter<String>

Specifies the performance counter to use. Valid values are:

-- CPUUsage
-- MemoryUsage
-- StorageIOPSUsage
-- NetworkIOUsage
-- PowerSavings

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TimeFrame<String>

Specifies the timeframe in which to gather performance data. Valid values are:

-- Hour
-- Day
-- Month

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<VM>

Specifies a virtual machine object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMHost<Host>

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.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMHostCluster<HostCluster>

Specifies a VMM host cluster object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMHostGroup<HostGroup>

Specifies a virtual machine host group object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • double[]

Examples

Example Example 1.: Get performance data for a host group.:

The first command gets the host group object named HostGroup01, and then stores the object in the $HostGroup variable.

The second command gets the memory usage data over the last three hours for HostGroup01.

PS C:\> $HostGroup = Get-SCVMHostGroup -Name "HostGroup01"
PS C:\> Get-SCPerformanceData -VMHostGroup $HostGroup -PerformanceCounter MemoryUsage -Timeframe Hour

Example Example 2.: Get performance data for a cluster.:

The first command gets the cluster object named Cluster01, and then stores the object in the $Cluster variable.

The second command gets the memory usage data for the last day (24 hours) for Cluster01.

PS C:\> $Cluster = Get-SCVMHostCluster -Name "Cluster01.Contoso.com"
PS C:\> Get-SCPerformanceData -VMHostCluster $Cluster -PerformanceCounter MemoryUsage -Timeframe Day

Example Example 3:. Get performance data for a specified host.:

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command gets the memory usage data for the last month (30 days) for VMHost01.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> Get-SCPerformanceData -VMHost $VMHost -PerformanceCounter MemoryUsage -Timeframe Month

Example Example 4.: Get performance data for a specified virtual machine.:

The first command gets the virtual machine object named VM01, and then stores the object in the $VM variable.

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

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> Get-SCPerformanceData -VM $VM -PerformanceCounter MemoryUsage -Timeframe Day

Example Example 5.: Get performance data for all VMs:a

This command gets the CPU usage data for all VMs.

PS C:\> Get-SCPerformanceData -AllVM -PerformanceCounter CPUUsage

Get-SCVirtualMachine

Get-SCVMHost

Get-SCVMHostCluster

Get-SCVMHostGroup