Get-SCSPFEventRegistration
取得用來自動化 Runbook 的事件。
Syntax
Get-SCSPFEventRegistration []
Get-SCSPFEventRegistration
[-Resource <String>]
[-Action <EventRegistrationActionNames>]
[<CommonParameters>]
Description
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