Get-ClusterVMMonitoredItem

Get-ClusterVMMonitoredItem

Gets the list of services and events currently being monitored in the virtual machine.

Syntax

Parameter Set: InputObject
Get-ClusterVMMonitoredItem [-Cluster <String> ] [-InputObject <PSObject> ] [-Wait <System.Int32> ] [ <CommonParameters>]

Parameter Set: VirtualMachine
Get-ClusterVMMonitoredItem [[-VirtualMachine] <System.String> ] [-Wait <System.Int32> ] [ <CommonParameters>]

Parameter Set: VMId
Get-ClusterVMMonitoredItem [-VMId <System.Guid> ] [-Wait <System.Int32> ] [ <CommonParameters>]




Detailed Description

The Get-ClusterVMMonitoredItem cmdlet gets the list of services and events currently being monitored in the virtual machine. If one of those services fails or one of the events occurs, then the system responds by taking an action based on the failover configuration for the virtual machine resource. For example, the configuration might specify that the virtual machine be restarted.

Parameters

-Cluster<String>

Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is . or it is omitted, then the cmdlet runs on the local cluster.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<PSObject>

Specifies the cluster on which to run the cmdlet or the clustered virtual machine for which to retrieve the clustered virtual machine monitored item object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VirtualMachine<System.String>

Specifies the name of the virtual machine that is monitored.


Aliases

VM

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMId<System.Guid>

Specifies the virtual machine identifier (ID).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Wait<System.Int32>

Specifies the time in seconds to wait for the cmdlet. If the Wait parameter is not specified, then the cmdlet waits for completion. If -Wait 0 is specified, then the call is initiated and the cmdlet returns without waiting.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.FailoverClusters.PowerShell.Cluster
  • Microsoft.FailoverClusters.PowerShell.ClusterGroup
  • Microsoft.FailoverClusters.PowerShell.ClusterResource

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.FailoverClusters.PowerShell.ClusterVMMonitoredItem

Examples

Example 1: Get monitored services and events for a virtual machine

This example returns the services and events being monitored in the virtual machine named vm1 on the cluster named Cluster1.


PS C:\> Get-Cluster –Name "Cluster1" | Get-ClusterVMMonitoredItem –VirtualMachine "vm1"

Related topics

Community Additions

ADD
Show: