Set-SCSPFEventRegistration
Establece un evento de Service Management Automation para automatizar un runbook.
Syntax
Set-SCSPFEventRegistration
-Resource <String>
-Action <EventRegistrationActionNames>
[-RunbookName <String>]
[-Enabled]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
El cmdlet Set-SCSPFEventRegistration registra un evento de Service Management Automation para automatizar un runbook.
Ejemplos
Ejemplo 1: Establecimiento de un evento
PS C:\>Set-SCSPFEventRegistration -ResourceName "VMM.VirtualMachine" -ActionName "Create" -RunbookName "Invoke-SampleCmdlet"
Este comando establece un runbook que se invocará cuando se ejecute el evento create para una nueva máquina virtual.
Parámetros
-Action
Especifica la acción en un recurso para el que se registra un evento de orquestador. Los valores permitidos para este parámetro son los siguientes:
- Action_Pause
- Action_Publish
- Action_Repair
- Action_Restart
- Action_Resume
- Action_Scale
- Action_Shutdown
- Action_Start
- Action_Stop
- Action_Unpublish
- Crear
- Eliminar
- Actualizar
- UpdateStatus
Type: | Microsoft.SystemCenter.Foundation.Cmdlet.EventRegistrationActionNames |
Accepted values: | Create, Update, Delete, Action_Pause, Action_Publish, Action_Repair, Action_Restart, Action_Resume, Action_Scale, Action_Shutdown, Action_Start, Action_Stop, Action_Unpublish, UpdateStatus |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Le solicita su confirmación antes de ejecutar el cmdlet.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Enabled
Indica que el evento está habilitado.
Type: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Resource
Especifica el recurso para el que se registra el evento de orquestador.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunbookName
Especifica el runbook que se va a invocar cuando se ejecuta el evento de orquestador.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Entradas
None
Salidas
System.Object