Remove-BitsTransfer

Remove-BitsTransfer

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

構文

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




詳細説明

The Remove-BitsTransfer cmdlet cancels a BITS transfer job. It deletes the underlying transfer job, removes any temporary files from the client, and deletes the associated BitsJob object.

When the Remove-BitsTransfer cmdlet cancels a transfer job, it deletes all the transfers. Consider a scenario is which you are transferring three files. One file is completely transferred, one file is pending, and one file is currently being transferred. In this scenario, Remove-BitsTransfer cancels the whole transfer and deletes the underlying files. Any files that were already transferred will not be available after you use the Remove-BitsTransfer cmdlet to cancel the transfer job. Optionally, you can use a Complete-BitsTransfer command to commit any files that are completely downloaded and to cancel the pending and current transfers. The transferred file would not be deleted and would be available.

パラメーター

-BitsJob<BitsJob[]>

Specifies the BITS transfer jobs to cancel. 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 (http://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.


  • After a job is removed (canceled) or completed, any job objects that were previously cached in variables or in scripts are no longer valid.

EXAMPLE 1

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

The output of the Get-BitsTransfer cmdlet is piped to the Remove-BitsTransfer cmdlet. The output is a set of BitsJob objects.


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

EXAMPLE 2

This command cancels 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 Remove-BitsTransfer cmdlet.


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

関連トピック

コミュニティの追加

追加
表示: