Retrieving statistical data
The Get-OMStat
cmdlet retrieves statistical data from the specified vRealize Operations Manager server. The syntax of the Get-OMStat
cmdlet is as follows:
Get-OMStat [-Resource] <OMResource[]> [-Key <OMStatKey[]>]
[-From <DateTime>] [-To <DateTime>] [-IntervalType
<OMStatIntervalType>] [-IntervalCount <Int32>] [-RollupType
<OMStatRollupType>] [-Server <OMServer[]>] [<CommonParameters>]
The -Resource
parameter is required.
In the first example, we will retrieve all of the statistical data for virtual machine DC001
and display the first five objects found, using the following command:
PowerCLI C:\> Get-OMStat -Resource DC001 | Select-Object -First 5
The output of the preceding command is as follows:
Resource Key Value Time -------- --- ----- ---- DC001 System Attributes|alert_count_... 0 2/2/2017 9:00:44 PM DC001 System Attributes...