Complete-BitsTransfer

Complete-BitsTransfer

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

Sintaxis

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

Descripción detallada

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.

Parámetros

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

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[]

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

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • None

    This cmdlet does not generate any output.

Ejemplos

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

Temas relacionados

Add-BitsFile

Get-BitsTransfer

Remove-BitsTransfer

Resume-BitsTransfer

Set-BitsTransfer

Start-BitsTransfer

Suspend-BitsTransfer