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}

相关主题

Set-SmaSchedule

Edit-SmaRunbook

Get-SmaRunbook

Publish-SmaRunbook

Import-SmaRunbook

Remove-SmaRunbook