Get-SCSPFEventRegistration
获取用于自动执行 Runbook 的事件。
语法
Get-SCSPFEventRegistration []
Get-SCSPFEventRegistration
[-Resource <String>]
[-Action <EventRegistrationActionNames>]
[<CommonParameters>]
说明
Get-SCSPFEventRegistration cmdlet 获取注册的事件,该事件可自动执行由 Service Management Automation 执行的 Runbook。
示例
示例 1:按名称获取事件注册
PS C:\>$EventBackup = Get-SCSPFEventRegistration -Action "Backup"
此命令获取包含 Action 参数的事件,并将其存储在$EventBackup变量中。
参数
-Action
指定事件的名称。 此参数的可接受值为:
- Action_Pause
- Action_Publish
- Action_Repair
- Action_Restart
- Action_Resume
- Action_Scale
- Action_Shutdown
- Action_Start
- Action_Stop
- Action_Unpublish
- 创建
- 删除
- 更新
- 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: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Resource
指定资源的路径。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
None
输出
System.Object