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