Export (0) Print
Expand All
Expand Minimize

Set-SCExternalJob

Updated: April 29, 2014

Applies To: System Center 2012 R2 Virtual Machine Manager

Set-SCExternalJob

Updates an existing external job.

Syntax

Parameter Set: Progress
Set-SCExternalJob [-Job] <Task> -ProgressValue <Int32> [ <CommonParameters>]

Parameter Set: Completed
Set-SCExternalJob [-Job] <Task> -Completed [-InfoMessage <String> ] [ <CommonParameters>]

Parameter Set: Failed
Set-SCExternalJob [-Job] <Task> -Failed -InfoMessage <String> [ <CommonParameters>]




Detailed Description

The Set-SCExternalJob cmdlet updates existing external jobs in Virtual Machine Manager (VMM). You can update the percent complete of the job, or set the status of the job to completed or failed.

For more information about external jobs, see the New-SCExternalJob cmdlet.

Parameters

-Completed

Sets the status of an external job to completed.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Failed

Indicates that this cmdlet sets the status of an external job to failed.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InfoMessage<String>

Provides an informational message for external jobs.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Job<Task>

Specifies a VMM job object.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ProgressValue<Int32>

Supplies the percent complete of the progress of an external job.


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.

  • Task

Examples

Example 1: Set an external job to 15 percent complete

The first command gets the external job object named ExternalJob01, and then stores the object in the $externalJob variable.

The second command sets the progress value for the job stored in $externalJob to 15.


PS C:\> $externalJob = Get-SCJob -Name "ExternalJob01"
PS C:\> Set-SCExternalJob -Job $externalJob -ProgressValue 15

Example 2: Set an external job to completed

The first command gets the external job object named ExternalJob02, and stores the object in the $externalJob variable.

The second command sets the status of the job stored in $externalJob to completed, and adds information about the job.


PS C:\> $externalJob = Get-SCJob -Name "ExternalJob02"
PS C:\> Set-SCExternalJob Job $externalJob -Completed -InfoMessage "Some information about the completed job"

Example 3: Set an external job to failed

The first command gets the external job object named ExternalJob03, and then stores the object in the $externalJob variable.

The second command sets the status of the job stored in $externalJob to failed, and adds information about the job.


PS C:\> $externalJob = Get-SCJob -Name "ExternalJob03"
PS C:\> Set-SCExternalJob -Job $externalJob -Failed -InfoMessage "An error message for the failed job"

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft