bitsadminBitsadmin Command Guide - Background File Transfer on Windows
Learn the bitsadmin command for scripted Background Intelligent Transfer Service jobs, including create, addfile, resume, monitor, and troubleshooting examples.
The bitsadmin command manages Background Intelligent Transfer Service (BITS) jobs from command line so you can download or upload files reliably in the background. It supports queued, throttled, and restartable transfers that survive network interruptions, making it useful for enterprise automation and controlled content distribution.
Although Microsoft now prefers PowerShell cmdlets for new automation, bitsadmin still appears in legacy operational scripts, maintenance tools, and managed environments. Understanding it helps you maintain older workflows safely and migrate them correctly.
This guide explains syntax, core options, practical examples, troubleshooting, related commands, FAQs, and a quick reference card.
What Is the Bitsadmin Command?
bitsadmin is the CLI interface to BITS, a Windows service designed for asynchronous, bandwidth-aware file transfer. Unlike basic download tools, BITS can pause, resume, and continue transfers across reboots and transient disconnects.
Use bitsadmin when you need resilient background delivery for updates, packages, or logs and must avoid saturating network links during business hours.
Bitsadmin Command Syntax
bitsadmin /<operation> [job] [arguments]
| Operation | Purpose | Example |
|---|---|---|
/create <job> | Create transfer job | bitsadmin /create MyJob |
/addfile <job> <remote> <local> | Add file pair to job | bitsadmin /addfile MyJob https://example/file.zip C:\Temp\file.zip |
/resume <job> | Start or continue transfer | bitsadmin /resume MyJob |
/info <job> /verbose | Check job status | bitsadmin /info MyJob /verbose |
/list | List current jobs | bitsadmin /list /allusers |
/complete <job> | Finalize completed job | bitsadmin /complete MyJob |
/cancel <job> | Cancel job | bitsadmin /cancel MyJob |
Parameters and Options
Create Job (/create)
Creates a named transfer container. A job can include one or multiple files.
Add File (/addfile)
Associates source URL and local destination path with the job.
Resume and Monitor (/resume, /info)
Starts transfer and reports progress, state, and errors.
Complete or Cancel (/complete, /cancel)
Completes successful jobs so output is committed, or cancels stale/failed jobs.
Practical Bitsadmin Examples
1) Create a new job
bitsadmin /create PatchDownload
This prepares a logical job object used by subsequent commands.
2) Add a file to download
bitsadmin /addfile PatchDownload https://intranet.example.com/patch.msu C:\Temp\patch.msu
Use trusted internal sources in enterprise pipelines.
3) Start transfer
bitsadmin /resume PatchDownload
BITS handles throttling and retries automatically.
4) Check detailed job status
bitsadmin /info PatchDownload /verbose
Inspect bytes transferred, error code, owner, and state.
5) List jobs for all users
bitsadmin /list /allusers
Useful on shared servers where multiple jobs may compete.
6) Complete finished transfer
bitsadmin /complete PatchDownload
Finalization step is required for completed jobs.
7) Cancel a stuck job
bitsadmin /cancel PatchDownload
Use when source URL changed or job is no longer needed.
8) Upload mode example
bitsadmin /create UploadJob
bitsadmin /addfile UploadJob C:\Logs\agent.log https://collector.example.com/upload/agent.log
bitsadmin /resume UploadJob
Legacy upload workflows may still depend on this model.
9) Batch style maintenance cleanup
bitsadmin /list /allusers
bitsadmin /cancel OldJob1
bitsadmin /cancel OldJob2
Reduce orphaned jobs that clutter transfer queues.
10) Health check in support workflow
sc query bits
bitsadmin /list /allusers
Validate service state and job inventory during incident triage.
Common Use Cases
- Legacy patch distribution - Background package delivery without saturating WAN links.
- Remote branch offices - Reliable transfers where connectivity is intermittent.
- Helpdesk remediation scripts - Pull tools and artifacts on demand.
- Centralized log upload - Send diagnostic bundles from endpoints.
- Maintenance job recovery - Resume broken transfers after outages.
- Bandwidth-sensitive operations - Avoid peak-hour network contention.
- Server staging workflows - Queue content before maintenance windows.
- Migration support - Keep old scripts running during transition to PowerShell.
- Scheduled deployment tasks - Pair with Task Scheduler for periodic pulls.
- Audit troubleshooting - Track transfer states and errors for RCA.
Tips and Best Practices
- Prefer HTTPS sources and verified certificates.
- Use stable job naming conventions for automation.
- Always call
/completeafter success. - Implement cleanup for abandoned jobs.
- Keep destination paths explicit and writable.
- Validate BITS service health before job creation.
- Add logging around
/info /verboseoutput. - Restrict
/allusersoperations to admin contexts. - Migrate net-new automations to PowerShell BITS cmdlets.
- Document fallback behavior for unreachable sources.
Troubleshooting Common Issues
Job stuck in transient error
Network interruptions or proxy issues are common. Check connectivity and retry with /resume.
Access denied on destination path
Use a writable folder and run elevated shell when required by target location ACLs.
Source URL not reachable
Validate DNS, proxy rules, certificate trust, and endpoint availability.
BITS service not running
Start service and set appropriate startup mode before retrying transfers.
Job never completes
Inspect /info /verbose, verify source integrity, and cancel/recreate job if metadata is stale.
Related Commands
powershell - Modern BITS automation
Use PowerShell cmdlets for new development while keeping bitsadmin knowledge for legacy support.
certutil - Alternative transfer utility
In constrained environments, certutil may be used for downloads, though it lacks BITS-style reliability features.
schtasks - Scheduling transfer operations
Run transfer jobs during off-hours to minimize user impact.
sc - Service state control
Verify and control BITS service state before automation runs.
Frequently Asked Questions
What does bitsadmin do?
Bitsadmin manages BITS transfer jobs from command line. It can create jobs, add transfer files, resume jobs, display status, complete successful jobs, and cancel failed or unused transfers.
Is bitsadmin deprecated?
Yes, Microsoft recommends PowerShell for new automation. Still, bitsadmin remains relevant for maintaining legacy scripts and environments where migration is still in progress.
Why does a completed job still appear?
BITS jobs must be finalized with /complete. Until then, they may remain in queue states.
Can bitsadmin survive network interruptions?
Yes. BITS is designed for restartable, background transfers that continue after transient network failures.
How do I see all jobs on a server?
Run bitsadmin /list /allusers in an elevated shell to inspect jobs across accounts.
Why do I get access denied?
Likely insufficient rights to target path or all-user operations. Use administrator context and valid ACLs.
What is the safest migration path?
Keep existing bitsadmin workflows stable, add logging, then migrate incrementally to PowerShell BITS cmdlets with equivalent behavior and tests.
Can I upload files with bitsadmin?
Yes, legacy upload scenarios are supported through job configuration and addfile mappings, though modern approaches may be easier to maintain.
Quick Reference Card
| Command | Purpose | Example |
|---|---|---|
bitsadmin /create MyJob | Create job | Start transfer workflow |
bitsadmin /addfile MyJob <remote> <local> | Add source/destination | Queue file transfer |
bitsadmin /resume MyJob | Run transfer | Start or continue |
bitsadmin /info MyJob /verbose | Inspect state | Troubleshoot progress |
bitsadmin /list /allusers | Inventory jobs | Server-wide diagnostics |
bitsadmin /complete MyJob | Finalize success | Commit job output |
bitsadmin /cancel MyJob | Cancel job | Cleanup stale transfer |
sc query bits | Check service | Verify BITS availability |
Try It in the Simulator
Practice command syntax safely in the Windows Command Simulator, then review adjacent tooling in the Commands Reference and related command guides for transfer automation and service diagnostics.
Summary
The bitsadmin command gives you resilient background transfer control for legacy Windows automation. Its strengths are queue-based reliability, resume behavior, and bandwidth-aware operation.
Use a clear sequence: create job, add files, resume, monitor, complete, and clean up. This approach keeps transfers predictable and easier to support in production.
For long-term maintainability, preserve existing scripts while planning migration to PowerShell-based transfer automation with equivalent operational safeguards.