다음을 통해 공유


Get-SmaJob

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

Get-SmaJob

Gets a runbook job.

Syntax

Parameter Set: GetAll
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]

Parameter Set: ByJobContextId
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-ContextId <String[]> ] [-Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]

Parameter Set: ByJobId
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Id <String[]> ] [-Port <Int32> ] [ <CommonParameters>]

Parameter Set: ByRunbookId
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-RunbookId <String[]> ] [ <CommonParameters>]

Parameter Set: ByRunbookName
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-RunbookName <String[]> ] [ <CommonParameters>]

Detailed Description

The Get-SmaJob cmdlet gets one or more runbook jobs in Service Management Automation. Specify the web service endpoint and, if necessary, a port. By default, all jobs are returned. To get a specific job, specify the JobId, JobContext, RunbookId, or RunbookName parameter.

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

-ContextId<String[]>

Specifies an array of context IDs.

Aliases

JobContextId

Required?

false

Position?

named

Default Value

none

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 an array of job IDs.

Aliases

JobId

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

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

-RunbookId<String[]>

Specifies an array of IDs, as strings, of a runbook.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunbookName<String[]>

Specifies an array of runbook names.

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

<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: Get a runbook job

This command gets the job with the specified GUID.

PS C:\> Get-SmaJob -WebServiceEndpoint "https://localhost" -JobId "2989b069-24fe-40b9-b3bd-cb7e5eac4b647" 

Resume-SmaJob

Stop-SmaJob

Suspend-SmaJob