Start-SmaRunbook
Start-SmaRunbook
Starts a runbook job.
語法
Parameter Set: ByRunbookName
Start-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Name <String> ] [-Parameters <IDictionary> ] [-Port <Int32> ] [-ScheduleName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ByRunbookId
Start-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Id <String> ] [-Parameters <IDictionary> ] [-Port <Int32> ] [-ScheduleName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細描述
The Start-SmaRunbook cmdlet starts a runbook job. Specify the ID or name of a runbook and the web service endpoint. If necessary, specify the port of the web service.
參數
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the Credential parameter.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
Windows |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the web service. To obtain a credential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential
.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Id<String>
Specifies the ID of a runbook.
別名 |
RunbookId |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
True (ByValue) |
接受萬用字元? |
false |
-Name<String>
Specifies the name of a runbook.
別名 |
RunbookName |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
True (ByValue) |
接受萬用字元? |
false |
-Parameters<IDictionary>
Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Port<Int32>
Specifies the port number of the web service.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-ScheduleName<String>
Specifies the name of a job schedule on which to start the runbook. To create a schedule in , use the Set-SmaSchedule cmdlet.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the web service. Include the protocol, for example, http:// or https://.
別名 |
無 |
必要? |
true |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Confirm
執行 Cmdlet 之前先提示您確認。
必要? |
false |
位置? |
named |
預設值 |
false |
接受管線輸入? |
false |
接受萬用字元? |
false |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。未執行 Cmdlet。
必要? |
false |
位置? |
named |
預設值 |
false |
接受管線輸入? |
false |
接受萬用字元? |
false |
<CommonParameters>
此 Cmdlet 支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 與 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
輸入
輸入類型是您可以使用管線處理方式傳遞給 Cmdlet 的物件類型。
輸出
輸出類型是 Cmdlet 所發出的物件類型。
範例
Example 1: Start a runbook job
This command starts the runbook named Runbk01, specifying the parameters for the runbook job.
PS C:\> Start-SmaRunbook -WebServiceEndpoint https://localhost -Name "Runbk01" -Parameters @{"StringParam"="Value"; "IntParam"=2}