Using the vRealize Operations Manager API
Until now, you have seen the cmdlets available in PowerCLI for vRealize Operations Manager. These cmdlets only explore a small set of things you can do with vRealize Operations Manager. vRealize Operations Manager has a REpresentational State Transfer Application Programming Interface (REST API) that you can easily use from PowerCLI. The $global:DefaultOMServers
variable has an ExtensionData
property that opens the gate to the API for you. First, we will create a variable $omApi
that contains the connection to the vRealize Operations Manager API, using the following command:
PowerCLI C:\> $omApi = $global:DefaultOMServers[0].ExtensionData
The $global:DefaultOMServers
variable can be an array containing connections to multiple vRealize Operations Manager Servers. This is why we used [0]
to select the first vROPs server.
By piping the output of the $omApi
variable to the Get-Member
cmdlet, you will see the available properties and methods, as follows...