NAME
Complete-BitsTransfer
SYNOPSIS
Completes a BITS transfer job.SYNTAX
Complete-BitsTransfer [-BitsJob]
[-Confirm] [-WhatIf] [ ] DESCRIPTION
The Complete-BitsTransfer cmdlet ends one or more Background Intelligent Transfer Service (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.PARAMETERS
-BitsJob
Specifies the BITS transfer jobs to complete. You can pipe a value to this parameter from other cmdlets thatreturn BitsJob objects, such as Get-BitsTransfer.
Required? true Position? 1 Default value none Accept pipeline input? True (ByValue) Accept wildcard characters? false-Confirm [
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false] -WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false] This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). INPUTS
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[] This cmdlet accepts one or more BitsJob objects as input that populates the BitsJob parameter.OUTPUTS
None This cmdlet does not generate any output.Example 1: Complete all BITS transfer jobs owned by the current user
C:\PS>Get-BitsTransfer | Complete-BitsTransfer
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.Example 2: Complete all BITS transfer jobs on the computer
PS C:\>$Bits = Get-BitsTransfer -AllUsers
PS C:\> Complete-BitsTransfer -BitsJob $Bits
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 $Bits variable.
The second command uses the BitsJob parameter to pass the BitsJob objects that are stored in the $Bits variable to
the Complete-BitsTransfer cmdlet.
Example 3: Complete a BITS transfer job by display name
PS C:\>Get-BitsTransfer -Name testjob1 | Complete-BitsTransfer
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.RELATED LINKS
Online Version:Add-BitsFile
Get-BitsTransfer
Remove-BitsTransfer
Resume-BitsTransfer
Set-BitsTransfer
Start-BitsTransfer
Suspend-BitsTransfer