Set-SCSPFEventRegistration

Sets a Service Management Automation event to automate a runbook.

Syntax

Set-SCSPFEventRegistration -Action <EventRegistrationActionNames> [-Confirm] [-Enabled] -Resource <String>
 [-RunbookName <String>] [-WhatIf] [<CommonParameters>]

Description

The Set-SCSPFEventRegistration cmdlet registers a Service Management Automation event to automate a runbook.

Examples

Example 1: Set an event

PS C:\>Set-SCSPFEventRegistration -ResourceName "VMM.VirtualMachine" -ActionName "Create" -RunbookName "Invoke-SampleCmdlet"

This command sets a runbook to invoke when the create event for a new virtual machine is executed.

Parameters

-Action

Specifies the action on a resource for which an orchestrator event is registered. The acceptable values for this parameter are:

- Action_Pause

  • Action_Publish
  • Action_Repair
  • Action_Restart
  • Action_Resume
  • Action_Scale
  • Action_Shutdown
  • Action_Start
  • Action_Stop
  • Action_Unpublish
  • Create
  • Delete
  • Update
  • UpdateStatus

Type:EventRegistrationActionNames
Parameter Sets:Create, Update, Delete, Action_Pause, Action_Publish, Action_Repair, Action_Restart, Action_Resume, Action_Scale, Action_Shutdown, Action_Start, Action_Stop, Action_Unpublish, UpdateStatus
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Enabled

Indicates that the event is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Resource

Specifies the resource for which the orchestrator event is registered.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunbookName

Specifies the runbook to invoke when the orchestrator event is executed.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False