Export (0) Print
Expand All
Expand Minimize

Add-ClusterVMMonitoredItem

Updated: August 15, 2012

Applies To: Windows Server 2012

Add-ClusterVMMonitoredItem

Configures monitoring for a service or an Event Tracing for Windows (ETW) event so that it is monitored on a virtual machine.

Syntax

Parameter Set: InputObject
Add-ClusterVMMonitoredItem [[-VirtualMachine] <String> ] [-Cluster <String> ] [-EventId <Int32> ] [-EventLog <String> ] [-EventSource <String> ] [-InputObject <PSObject> ] [-OverrideServiceRecoveryActions] [-Service <StringCollection> ] [ <CommonParameters>]




Detailed Description

The Add-ClusterVMMonitoredItem cmdlet configures monitoring for a service or an Event Tracing for Windows (ETW) event so that it is monitored on a virtual machine. If the service fails or the event 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

-EventId<Int32>

Specifies the event identifier (ID) of the event to be monitored.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EventLog<String>

Specifies the event log of the event to be monitored.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EventSource<String>

Specifies the event source of the event to be monitored.


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, the clustered virtual machine on which to configure monitoring, and the cluster virtual machine monitored item object to monitor.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-OverrideServiceRecoveryActions

Specifies that the cluster service will fix, by overriding, the service recovery actions in the event that it is not properly configured for monitoring. To be configured for monitoring the following conditions need to be met:
-- None of the service recovery actions are set to Restart the computer.
---- AND
-- At least one of the service recovery actions are set to Take no action.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Service<StringCollection>

Specifies the name of a service to be monitored. This must be the short name, not the long name, of the service. For example, specify clussvc instead of Failover Cluster service.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualMachine<String>

Specifies the name of the clustered virtual machine on which to perform monitoring. When this parameter is specified, the cmdlet must be run on one of the host cluster nodes, or else the Cluster parameter must also be specified.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. 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
  • Microsoft.FailoverClusters.PowerShell.ClusterVMMonitoredItem

Outputs

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

  • None

Examples

Example 1

This example adds monitoring for the ETW event ID 4708.


PS C:\> Add-ClusterVMMonitoredItem –VirtualMachine test-VM11 -EventLog "Microsoft-Windows-FailoverClustering-Manager/Admin" -EventSource "Microsoft-Windows-FailoverClustering-Manager" -EventId 4708
Name 
---- 
Microsoft-Windows-FailoverClustering-Manager+Admin,Microsoft-Windows-FailoverClustering-Manager,4708 

Example 2

This example configures monitoring for the print spooler service.


PS C:\> Add-ClusterVMMonitoredItem –VirtualMachine test-VM11 -Service spooler
Name 
---- 
Spooler 

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft