Edit-SmaRunbook
Edit-SmaRunbook
Updates the draft field of a runbook.
語法
Parameter Set: ByRunbookName
Edit-SmaRunbook -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Name <String> ] [-Overwrite] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ByRunbookId
Edit-SmaRunbook -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Id <String> ] [-Overwrite] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細描述
The Edit-SmaRunbook updates the draft field of a runbook. Provide a Windows PowerShell script (.ps1) file that contains a runbook which becomes the draft runbook. If a draft already exists, use the Overwrite parameter to force the cmdlet to overwrite the existing draft.
參數
-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 |
預設值 |
Current User |
接受管線輸入? |
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 |
-Overwrite
Indicates that the new draft runbook overwrites the existing draft, if one exists.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Path<String>
Specifies a path to the new draft runbook.
別名 |
RunbookPath |
必要? |
true |
位置? |
named |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Port<Int32>
Specifies the port number of the web service.
別名 |
無 |
必要? |
false |
位置? |
named |
預設值 |
9090 |
接受管線輸入? |
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: Overwrite an existing draft runbook
This command overwrites the existing draft runbook.
PS C:\> Edit-SmaRunbook -Name "Runbk01" -WebServiceEndpoint https://contoso.com -Path App01.ps1 -Overwrite