Get-SCPerformanceData
Gets performance data for host groups, clusters, hosts, and virtual machines.
Syntax
VM
Get-SCPerformanceData
[-VM] <VM>
-TimeFrame <String>
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[<CommonParameters>]
Host
Get-SCPerformanceData
[-VMHost] <Host>
-TimeFrame <String>
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[<CommonParameters>]
Cluster
Get-SCPerformanceData
[-VMHostCluster] <HostCluster>
-TimeFrame <String>
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[<CommonParameters>]
HostGroup
Get-SCPerformanceData
[-VMHostGroup] <HostGroup>
-TimeFrame <String>
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[<CommonParameters>]
AllVNIC
Get-SCPerformanceData
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[-AllVNIC]
[<CommonParameters>]
AllVM
Get-SCPerformanceData
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[-AllVM]
[<CommonParameters>]
AllVMNetworkGateway
Get-SCPerformanceData
-PerformanceCounter <String>
[-VMMServer <ServerConnection>]
[-AllVMNetworkGateway]
[<CommonParameters>]
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
Examples
Example 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.
Example 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.
Example 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.
Example 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.
Example 5: Get performance data for all virtual machines
PS C:\> Get-SCPerformanceData -AllVM -PerformanceCounter "CPUUsage"
This command gets the CPU usage data for all virtual machines.
Parameters
-AllVM
Indicates that data for all virtual machines is returned.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
AllVM
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-AllVMNetworkGateway
Indicates that data for all network gateways is returned.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
AllVMNetworkGateway
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-AllVNIC
Indicates that data for all virtual network adapters is returned.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
AllVNIC
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PerformanceCounter
Specifies the performance counter to use. The acceptable values for this parameter are:
- CPUUsage
- MemoryUsage
- StorageIOPSUsage
- NetworkIOUsage
- PowerSavings
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | CPUUsage, MemoryUsage, StorageIOPSUsage, NetworkIOUsage, NetworkIOSent, NetworkIOReceived, PowerSavings |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-TimeFrame
Specifies the timeframe in which to gather performance data. The acceptable values for this parameter are:
- Hour
- Day
- Month
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | Hour, Day, Month |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
VM
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
Host
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
Cluster
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
HostGroup
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VM
Specifies a virtual machine object.
Parameter properties
| Type: | VM |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
VM
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VMHost
Specifies a virtual machine host object. Virtual Machine Manager (VMM) supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.
For more information about each type of host, see the Add-SCVMHost cmdlet.
Parameter properties
| Type: | Host |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Host
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VMHostCluster
Specifies a VMM host cluster object.
Parameter properties
| Type: | HostCluster |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Cluster
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VMHostGroup
Specifies a virtual machine host group object.
Parameter properties
| Type: | HostGroup |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
HostGroup
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VMMServer
Specifies a VMM server object.
Parameter properties
| Type: | ServerConnection |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
double
This cmdlet returns an array of double values.