The Background Intelligent Transfer Service (BITS) is a core component of the Windows operating system. It manages file downloads and uploads using idle network bandwidth. This ensures that system updates, security patches, and application data transfers happen smoothly without interrupting your daily work.
Understanding how to control BITS allows you to troubleshoot stuck updates, manage bandwidth usage, and automate file transfers efficiently. What is BITS?
BITS transfers files asynchronously in the background. Unlike standard download managers that compete for your internet connection, BITS only uses bandwidth that other applications are not actively utilizing.
If you start streaming a video or downloading a large file in your browser, BITS automatically throttles its own speed down. When you close your browser, BITS speeds up again.
Additionally, BITS is highly resilient. If your computer loses connection, reboots, or goes to sleep, the transfer pauses automatically. It resumes from the exact byte where it left off once the network is restored. Step 1: Managing the BITS Windows Service
Before executing commands, you must ensure the BITS service is running correctly on your machine. Press Windows Key + R to open the Run dialog box. Type services.msc and press Enter.
Scroll down the list to find Background Intelligent Transfer Service.
Check the Status column. If it is blank, right-click the service and select Start.
To ensure it runs automatically, right-click it, choose Properties, change the Startup type to Automatic (Delayed Start), and click Apply. Step 2: Controlling BITS via Command Prompt (Bitsadmin)
Windows includes a command-line tool called bitsadmin to create and manage transfer jobs. Open Command Prompt as an administrator to run these commands.
Create a Download Job: Start by creating a container for your transfer. bitsadmin /create MyDownloadJob Use code with caution.
Add a File to the Job: Link the remote source URL to your local destination folder.
bitsadmin /addfile MyDownloadJob https://example.com C:\Downloads\file.zip Use code with caution.
Activate the Job: New jobs are created in a suspended state. Resume the job to start the download. bitsadmin /resume MyDownloadJob Use code with caution.
Check the Status: Monitor the progress, transfer speed, and state of your job. bitsadmin /info MyDownloadJob /verbose Use code with caution.
Complete the Job: Once the status shows “Transferred”, you must complete the job to release the file to your destination directory. bitsadmin /complete MyDownloadJob Use code with caution. Step 3: Mastering BITS with PowerShell
For modern automation, PowerShell offers a more robust set of cmdlets that integrate seamlessly with scripts.
Start a Simple Download: Use a single command to download a file in the background. powershell
Start-BitsTransfer -Source “https://example.com” -Destination “C:\Downloads\file.zip” Use code with caution.
View Active Jobs: Monitor all ongoing background transfers on your system. powershell Get-BitsTransfer Use code with caution.
Asynchronous Transfers: To keep your PowerShell console free while the download runs in the background, add the -Asynchronous parameter. powershell
\(job = Start-BitsTransfer -Source "https://example.com" -Destination "C:\Downloads\file.zip" -Asynchronous </code> Use code with caution.</p> <p><strong>Complete an Asynchronous Job:</strong> Just like the command-line tool, finalize the transfer to access your file. powershell <code>Get-BitsTransfer -Name \)job.JobId | Complete-BitsTransfer Use code with caution. Step 4: Troubleshooting Common BITS Issues
Sometimes BITS jobs get stuck due to network interruptions or corrupted update caches, which can prevent Windows Updates from installing.
Clear the Queue: If a job is permanently suspended or throwing errors, list all jobs and cancel them. bitsadmin /reset /allusers Use code with caution.
Use the Built-in Troubleshooter: Windows includes an automated tool to repair BITS mapping. Go to Settings > System > Troubleshoot > Other troubleshooters, and run the Windows Update troubleshooter, which automatically resets BITS.
Flush the Network Cache: If BITS fails to connect to download servers, reset your network stack by opening Command Prompt as an admin and typing netsh winsock reset followed by a system reboot.
By mastering these command-line and PowerShell tools, you can ensure your system updates stay on track without sacrificing your network performance.
If you’d like to take this a step further, let me know if you want me to:
Help you write a custom PowerShell script to automate daily backups using BITS
Provide a list of common BITS error codes and how to fix them
Explain how to configure BITS bandwidth limits using Group Policy
Leave a Reply