## PowerCLI Reference

# Get-OMStatKey

## Synopsis

This cmdlet retrieves vRealize Operations Manager statistic keys.

Syntax

Get-OMStatKey [[-Name] <String[]>] [-ResourceKind <String[]>] [-AdapterKind <String[]>] [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]
Get-OMStatKey [[-Name] <String[]>] -Resource <OMResource[]> [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves vRealize Operations Manager statistic keys for a specified adapter and a specified resource. A statistic key, or a metric key, is an identifier of a vRealize Operations Manager metric which can be used to refer to this metric when necessary. For example, you can refer to a metric when retrieving data for it.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Filters the statistic keys by name. | false | false
AdapterKind | String[] | Specifies the vRealize Operations resource kind for which to retrieve the valid statistic counter keys. | false | false
InformationAction | ActionPreference |  | false | false
InformationVariable | String |  | false | false
PipelineVariable | String |  | false | false
Resource | OMResource[] | Specifies the resource object for which to return the valid instance metric keys. Note: The returned keys that identify metric data for a specific instance object, like a CPU or network adapter, do not contain a description or ExtensionData info. | true | true (ByValue)
ResourceKind | String[] | Specifies the adapter kind for which to retrieve the valid statistic counter keys. | false | false
Server | OMServer[] | Specifies the vRealize Operations Manager server from which you want to retrieve alerts. The value can be the connection object returned by the Connect-OMServer cmdlet or the object's name, which can be the IP or DNS address of the server machine. | false | false

Return Type

Zero or more OMStatKey objects

Notes

Examples

-------------- Example 1 --------------

    Get-OMStatKey -Name 'diskspace|total|*'

Retrieves statistic keys whose name begins with 'diskspace|total|'.

-------------- Example 2 --------------

    Get-OMStatKey -AdapterKind 'VMware'

Retrieves statistic keys for the 'VMware' adapter kind.

-------------- Example 3 --------------

    Get-OMStatKey -ResourceKind 'Folder'

Retrieves statistic keys for the 'Folder' resource kind.

-------------- Example 4 --------------

    Get-OMResource 'MyDatastore' | Get-OMStatKey

Retrieves statistic keys for the 'MyDatastore' resource.

Copyright © VMware, Inc. All rights reserved.