Set-SCExternalJob

Set-SCExternalJob

Updates an existing external job.

構文

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

詳細説明

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.

パラメーター

-Completed

Sets the status of an external job to completed.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Failed

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

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InfoMessage<String>

Provides an informational message for external jobs.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Job<Task>

Specifies a VMM job object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-ProgressValue<Int32>

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

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Task

Example Example 1: Set an external job to 15 percent% complete. percent

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"

関連トピック

New-SCExternalJob

Get-SCJob