次の方法で共有


Start-SmaRunbook

Applies To: System Center 2012 R2 Orchestrator, Windows Azure Pack for Windows Server

Start-SmaRunbook

Starts a runbook job.

Syntax

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>]

Detailed Description

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 Service Management Automation web service.

Parameters

-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.

Aliases

none

Required?

false

Position?

named

Default Value

Windows

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies user credentials, as a PSCredential object, to use for the connection to the Service Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<String>

Specifies the ID of a runbook.

Aliases

RunbookId

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a runbook.

Aliases

RunbookName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Port<Int32>

Specifies the port number of the Service Management Automation web service.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ScheduleName<String>

Specifies the name of a job schedule on which to start the runbook. To create a schedule in Service Management Automation, use the Set-SmaSchedule cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WebServiceEndpoint<String>

Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the protocol, for example, http:// or https://.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

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