PowerCLI Reference



This cmdlet retrieves vRealize Operations Manager resource objects.


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

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

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

Related Commands

Online Version

Detailed Description

This cmdlet retrieves vRealize Operations Manager resource objects.


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



-------------------------- 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.