< Back
Get-Metric
Post
NAME Get-Metric
SYNOPSIS
This cmdlet retrieves the available metrics on a vCenter Server system.
SYNTAX
Get-Metric [[-Name] <String[]>] [-MetricGroup <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves the available metrics on a vCenter Server system. The cmdlet returns a set of metrics that
correspond to the filter criteria provided by the cmdlet parameters. To specify a server different from the
default one, use the Server parameter.
PARAMETERS
-MetricGroup <String[]>
Specifies the metric groups of the metrics that you want to retrieve.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies the names of the metrics that you want to retrieve.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the
command runs on the default servers. For more information about default servers, see the description of the
Connect-VIServer cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
VMware.VimAutomation.ViCore.Types.V1.Metric
NOTES
-------------------------- Example 1 --------------------------
Get-Metric
Retrieves all available metrics.
-------------------------- Example 2 --------------------------
Get-Metric -Name "Usage*"
Retrieves metrics with the name Usage.
-------------------------- Example 3 --------------------------
Get-Metric -MetricGroup "CPU" $server
Retrieves all available metrics on the server that match the pattern.
-------------------------- Example 4 --------------------------
Get-Metric -Name "Usage" -MetricGroup "CPU"
Retrieves all metrics with the name Usage from a metric group CPU.
RELATED LINKS
Get-AlarmAction
Get-AlarmActionTrigger
Get-AlarmDefinition
Get-AlarmTrigger
New-AlarmAction
New-AlarmActionTrigger
New-AlarmDefinition
New-AlarmTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger
Remove-AlarmDefinition
Set-AlarmDefinition
Get-Metric
Get-EventType
SYNOPSIS
This cmdlet retrieves the available metrics on a vCenter Server system.
SYNTAX
Get-Metric [[-Name] <String[]>] [-MetricGroup <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves the available metrics on a vCenter Server system. The cmdlet returns a set of metrics that
correspond to the filter criteria provided by the cmdlet parameters. To specify a server different from the
default one, use the Server parameter.
PARAMETERS
-MetricGroup <String[]>
Specifies the metric groups of the metrics that you want to retrieve.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies the names of the metrics that you want to retrieve.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the
command runs on the default servers. For more information about default servers, see the description of the
Connect-VIServer cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
VMware.VimAutomation.ViCore.Types.V1.Metric
NOTES
-------------------------- Example 1 --------------------------
Get-Metric
Retrieves all available metrics.
-------------------------- Example 2 --------------------------
Get-Metric -Name "Usage*"
Retrieves metrics with the name Usage.
-------------------------- Example 3 --------------------------
Get-Metric -MetricGroup "CPU" $server
Retrieves all available metrics on the server that match the pattern.
-------------------------- Example 4 --------------------------
Get-Metric -Name "Usage" -MetricGroup "CPU"
Retrieves all metrics with the name Usage from a metric group CPU.
RELATED LINKS
Get-AlarmAction
Get-AlarmActionTrigger
Get-AlarmDefinition
Get-AlarmTrigger
New-AlarmAction
New-AlarmActionTrigger
New-AlarmDefinition
New-AlarmTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger
Remove-AlarmDefinition
Set-AlarmDefinition
Get-Metric
Get-EventType