## 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[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]
Get-OMResource -Id <String[]> [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]
Get-OMResource [-Entity] <VIObjectCore[]> [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves vRealize Operations Manager resource objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Entity | VIObjectCore[] | 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. | true | true (ByValue)
Name | String[] | Filters the resource objects by name. | false | false
AdapterKind | String[] | 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. | false | false
Id | String[] | Filters the resource objects by ID. | true | false
InformationAction | ActionPreference |  | false | false
InformationVariable | String |  | false | false
Orphaned | SwitchParameter | If specified, retrieves only resources whose State property is empty. | false | false
PipelineVariable | String |  | false | false
ResourceKind | String[] | Filters the resource objects by the type of the resource. If ResourceKind is not specified, resource objects of all types are retrieved. | 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 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.