text
stringlengths
0
4.23k
bitsadmin cache and setexpirationtime
Sets the cache expiration time.
bitsadmin cancel
Removes the job from the transfer queue and deletes all temporary files associated with the job.
Syntax
bitsadmin /cancel <job>
Parameters
Parameter
Description
job
The job's display name or GUID.
Examples
To remove the myDownloadJob job from the transfer queue:
bitsadmin /cancel myDownloadJob
bitsadmin complete
Completes the job. Use this switch after the job moves to the transferred state. Otherwise, only those files that have been successfully transferred will be available.
Syntax
bitsadmin /complete <job>
Parameters
Parameter
Description
job
The job's display name or GUID.
Example
To complete the myDownloadJob job, after it reaches the TRANSFERRED state:
TRANSFERRED
bitsadmin /complete myDownloadJob
If multiple jobs use myDownloadJob as their name, you must use the job's GUID to uniquely identify it for completion.
bitsadmin create
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Creates a transfer job with the given display name.
Note
The /Upload and /Upload-Reply parameter types aren't supported by BITS 1.2 and earlier.
Syntax
bitsadmin /create [type] displayname
Parameters
Parameter
Description
type
There are three types of jobs:/Download. Transfers data from a server to a local file./Upload. Transfers data from a local file to a server./Upload-Reply. Transfers data from a local file to a server and receives a reply file from the server.This parameter defaults to /Download if it's not specified.
displayname
The display name assigned to the newly created job.
Examples
To create a download job named myDownloadJob:
bitsadmin /create myDownloadJob
bitsadmin examples
The following examples show how to use the bitsadmin tool to perform the most common tasks.
bitsadmin
Transfer a file
To create a job, add files, activate the job in the transfer queue, and to complete the job:
bitsadmin /transfer myDownloadJob /download /priority normal https://downloadsrv/10mb.zip c:\\10mb.zip
bitsadmin /transfer myDownloadJob /download /priority normal https://downloadsrv/10mb.zip c:\\10mb.zip
BITSAdmin continues to show progress information in the MS-DOS window until the transfer completes or an error occurs.
Create a download job
To create a download job named myDownloadJob:
bitsadmin /create myDownloadJob
BITSAdmin returns a GUID that uniquely identifies the job. Use the GUID or job name in subsequent calls. The following text is sample output.
Sample output
created job {C775D194-090F-431F-B5FB-8334D00D1CB6}
created job {C775D194-090F-431F-B5FB-8334D00D1CB6}
Add files to the download job
To add a file to the job:
bitsadmin /addfile myDownloadJob https://downloadsrv/10mb.zip c:\\10mb.zip
Repeat this call for each file you want to add. If multiple jobs use myDownloadJob as their name, you must use the job's GUID to uniquely identify it for completion.
Activate the download job
After you create a new job, BITS automatically suspends the job. To activate the job in the transfer queue:
bitsadmin /resume myDownloadJob
If multiple jobs use myDownloadJob as their name, you must use the job's GUID to uniquely identify it for completion.
Determine the progress of the download job