It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda RMM
formerly Managed Workplace

Resetting BITS Queue and Windows Update Agent

  • Last updated on

From time to time, the BITS queue might get clogged. This is usually the result of a corrupted download within the queue or another underlying issue. If this occurs, patching will not flow through Barracuda RMM. Support will, at times, advise clearing the BITS queue after the team has looked at the WSUSClientDiagnostic information. This article, in brief, will describe ways to reset the BITS queue.

If the BITS queue checks errors in the WSUSClientDiagnostic, it does include remediation steps from Microsoft's advisement on BitsAdmin commands. The following have a few options on how to reset the BITS queue.


Resetting BITS Queue and Windows Update Agent through Automation

  • Remove the Patching Policy from the impacted Device (if it is OM managed and other devices are patching, only the impacted device should suffice)
  • Download this script from GitHub and unzip it
  • In Barracuda RMM go to Automation
    • Select Library
    • Click on New Script
    • Name the script "Reset Windows Update"
    • Browse for the unzipped Reset-WindowsUpdate.ps1 file
    • Give the script a Category of your choosing then Save
  • Now run the script
    • Go to Automation
    • Select Run Now
    • Choose Item from Library
    • Find Reset Windows Update
    • Target the Device you wish to reset BITS Queue and Windows Update Agent
    • Click on Run Now
    • Allow for the script to complete and reboot the device
  • After 60 Minutes, re-apply the Patching Police to the impacted Device
  • Allow for 24-48 hours to permit for a patching soak time and patch cycle to complete

The following is for manual intervention on BITS Queue resets, however, the script and automation process above should take care of any issues that the below portion covers.


Scripted BITS queue reset

  • Open Notepad and paste the following:

    @echo off
    net stop BITS
    ipconfig /flushdns
    ren "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr0.dat" qmgr0.dat.old
    ren "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr1.dat" qmgr1.dat.old
    net start BITS
  • Save the file as a .bat.
  • Open the Command prompt as an administrator.
  • Execute the batch file that was just created either by entering the full patch and file name or dragging and dropping the batch file into the command prompt window.
    Verify that the BITS queue is now empty by running, PowerShell

    -command “Get-BITSTransfer -Allusers


  • To Reset BITS queue with Command Prompt
  • Open Command Prompt as Administrator
  • Run the following command:

    bitsadmin /reset /allusers

To Reset BITS queue with PowerShell

  • Open PowerShell as Administrator
  • Run the following commands:

     

    Import-module bitstransfer
    Get-bitstransfer –allusers
    Get-bitstransfer –allusers | remove-bitstransfer

Deleting the BITS Queue from Microsoft Store

Note: While this is an option, it is not an officially supported one by Barracuda RMM. We advise you to speak with Microsoft if the previous two options are not working.

  • Open the File Explorer
  • Browse to C:\ProgramData\Microsoft\Network\Downloader
  • Delete the contents of that folder
  • Reboot the device
Barracuda Support Note

For more information, please refer to this Microsoft Article for Additional Resources.