Specifies the destination location and the names of the files that you want to transfer. The destination names
are paired with the corresponding source file names. For instance, the first file name specified in the Source
parameter corresponds to the first file name in the Destination parameter, and the second file name in the
Source parameter corresponds to the second file name in the Destination parameter. The Source and Destination
parameters must have the same number of elements; otherwise, the command produces an error.
Required? false
Position? 3
Default value none
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Source
Specifies the source location and the names of the files that you want to transfer. The source file names are
paired with the corresponding destination file names. For instance, the first file name specified in the
Source parameter corresponds to the first file name in the Destination parameter, and the second file name in
the Source parameter corresponds to the second file name in the Destination parameter. The Source and
Destination parameters must have the same number of elements; otherwise, the command produces an error. You
can use standard wildcard characters such as the asterisk (*) and the question mark (?), or you can use a
range operator such as "[a-r]".
Required? true
Position? 2
Default value none
Accept pipeline input? True (ByPropertyName)
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
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[]
This cmdlet generates the BitsJob objects that are associated with the BITS transfer jobs to which the files
were added.
Example 1: Append a file to the transfer queue of an existing BITS transfer job
This example adds a set of files to the transfer queue of a new BITS transfer job.
The first command creates a new BitsJob object and then stores it in the $Bits variable.
The second command uses the Import-CSV cmdlet to import a text file that contains a list of files to be
transferred. The text file is converted to an array of objects (one per line) and passed through the pipeline to
the Add-BitsFile cmdlet. The BitsJob parameter is used to pass the BitsJob object (the transfer job) that is
stored in the $Bits variable to the Add-BitsFile cmdlet. This command also updates the transfer job with the list
of files to be transferred.
The third command passes the BitsJob object that is stored in the $Bits variable to the Resume-BitsTransfer
cmdlet. The BITS transfer job is restarted, and the files that are specified in the Filelist.txt file are
transferred from the source to the destination.
The Import-CSV filelist.txt element of the second command imports a text file that contains the list of files to
be transferred. Each line of this file specifies a file to be transferred, in the , format.
The text file is converted to an array of objects, one per line, and passed through the pipeline. In this example,
the array of objects is passed to the Add-BitsFile cmdlet.
The contents of the Filelist.txt file resemble the following information:
Source, Destination
http://server01/servertestdir/testfile1.txt, c:\clienttestdir\testfile1.txt
http://server01/servertestdir/testfile2.txt, c:\clienttestdir\testfile2.txt
http://server01/servertestdir/testfile3.txt, c:\clienttestdir\testfile3.txt
http://server01/servertestdir/testfile4.txt, c:\clienttestdir\testfile4.txt