Get-OMResource
This cmdlet retrieves vRealize Operations Manager resource objects.
Syntax
[-AdapterKind
<String[]>]
[-Name <String[]>]
[-Orphaned]
[-ResourceKind <String[]>]
[-Server <OMServer[]>]
[CommonParameters]
[-Name <String[]>]
[-Orphaned]
[-ResourceKind <String[]>]
[-Server <OMServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
String[] | named |
|
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. | optional |
|
String[] | named |
|
Filters the resource objects by name. | optional |
|
SwitchParameter | named |
|
If specified, retrieves only resources whose State property is empty. | optional |
|
String[] | named |
|
Filters the resource objects by the type of the resource. If ResourceKind is not specified, resource objects of all types are retrieved. | optional |
|
OMServer[] | named |
|
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. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String[] | named |
|
Filters the resource objects by ID. | optional |
|
OMServer[] | named |
|
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. |
-Entity
<VIObjectCore[]>
[CommonParameters]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VIObjectCore[] | named |
|
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. |
Output
VMware.VimAutomation.vROps.Types.V1.OMResource
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.
Example 2
Get-OMResource -Name 'MyResource'
Retrieves resource objects by name.
Example 3
Get-OMResource -AdapterKind VMWARE -ResourceKind HostSystem
Retrieves all vRealize Operations Manager resource objects that represent vCenter Server instances.
Example 4
$omresource = Get-OMResource -Name 'MyResource'
$omresource.ResourceStatus
Retrieves the resource status for all adapters monitoring the 'MyResource' resource object.