PowerCLI Reference

Get-OMResource

Synopsis

This cmdlet retrieves vRealize Operations Manager resource objects.

Syntax

Get-OMResource [[-Name] <String[]>] [-ResourceKind <String[]>] [-AdapterKind <String[]>] [-Orphaned] [-Server <OMServer[]>] [<CommonParameters>]

Get-OMResource -Id <String[]> [-Server <OMServer[]>] [<CommonParameters>]

Get-OMResource [-Entity] <VIObjectCore[]> [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves vRealize Operations Manager resource objects.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
EntityVIObjectCore[]Specifies the solution object whose respective vRealize Operations Manager resource counterpart to retrieve. The supported object types from the vCenter Server solution are Cluster Compute Resource, Datacenter, Datastore, Datastore Cluster, Folder, Host System, Resource Pool, vCenter Server, Virtual Machine, vSphere Distributed Port Group, and vSphere Distributed Switch.truetrue (ByValue)
NameString[]Filters the resource objects by name.falsefalse
AdapterKindString[]Filters the resource objects by the type of adapter that manages them. If AdapterKind is not specified, resource objects from all adapter types are retrieved.falsefalse
IdString[]Filters the resource objects by ID.truefalse
OrphanedSwitchParameterIf specified, retrieves only resources whose State property is empty.falsefalse
ResourceKindString[]Filters the resource objects by the type of the resource. If ResourceKind is not specified, resource objects of all types are retrieved.falsefalse
ServerOMServer[]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.falsefalse

Return Type

Zero or more OMResource objects

Notes

Examples

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

$vCenterCluster = Get-Cluster 'MyCluster'
$clusterResource = Get-OMResource -Entity $vCenterCluster

Retrieves the vRealize Operations Manager resource object that is counterpart of the vCenter Server cluster object.

Note: The vCenter Server instance that manages the "MyCluster" cluster must be added as a solution instance to the connected vRealize Operations Manager server.

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

Get-OMResource -Name 'MyResource'

Retrieves resource objects by name.

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

Get-OMResource -AdapterKind VMWARE -ResourceKind HostSystem

Retrieve all vRealize Operations Manager resource objects that represent vCenter Server instances.


Copyright © VMware, Inc. All rights reserved.