Complete-BitsTransfer

Complete-BitsTransfer

Completes a Background Intelligent Transfer Service (BITS) transfer job.

構文

Parameter Set: Default
Complete-BitsTransfer [-BitsJob] <BitsJob[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Complete-BitsTransfer cmdlet ends one or more BITS transfer jobs and then saves the files on the client computer. If an error occurs, the associated BitsJob object is written to the error pipeline.

パラメーター

-BitsJob<BitsJob[]>

Specifies the BITS transfer jobs to complete. You can pipe a value to this parameter from other cmdlets that return BitsJob objects, such as Get-BitsTransfer.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

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

True (ByValue)

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

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

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

false

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

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

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

false

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

false

<CommonParameters>

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

入力

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

  • Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[]

    This cmdlet accepts one or more BitsJob objects as input that populates the BitsJob parameter.

出力

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

  • None

    This cmdlet does not generate any output.

EXAMPLE 1

This command completes all the BITS transfer jobs that are owned by the current user.

In this command, the output of the Get-BitsTransfer cmdlet is piped to the Complete-BitsTransfer cmdlet. The output is a set of BitsJob objects.

C:\PS>Get-BitsTransfer | Complete-BitsTransfer

EXAMPLE 2

These commands complete all the BITS transfer jobs on the computer.

The first command retrieves all the BitsJob objects on the computer and then stores them in the $b variable.

The second command uses the BitsJob parameter to pass the BitsJob objects that are stored in the $b variable to the Complete-BitsTransfer cmdlet.

PS C:\>$b = Get-BitsTransfer -AllUsers
PS C:\>Complete-BitsTransfer -BitsJob $b

EXAMPLE 3

This command completes the BITS transfer job that is identified by the specified display name.

The output of the Get-BitsTransfer cmdlet is a BitsJob object. This output is piped to the Complete-BitsTransfer cmdlet.

PS C:\>Get-BitsTransfer -Name testjob1 | Complete-BitsTransfer

関連トピック

Add-BitsFile

Get-BitsTransfer

Remove-BitsTransfer

Resume-BitsTransfer

Set-BitsTransfer

Start-BitsTransfer

Suspend-BitsTransfer