Friday, January 2, 2015

Resetting BITS Jobs

There have been instances where Configuration Manager distribution points stop accepting content. Network services are fine and I can copy the content manually but it will never get there on its own.  I've only had this happen a couple of times on Server 2008 R2 machines. The only role installed on these servers is a distribution point and there are no shared services on the box. What seems to happen is that the BITS client gets stuck on a job and all other jobs get queued indefinitely. Since BITS is a component of Windows Configuration Manager never reports a problem. The only symptom is that content never gets there. Here is how you can check the status of BITS jobs.

·         Launch administrative PowerShell
·         Run Import-Module BitsTransfer
·         Run Get-BitsTransfer -AllUsers
·         Open Task Scheduler and create a new task (Note for Windows 8 or Server 2012 and above you need to use Sysinternals PsExec with the -s switch (http://msdn.microsoft.com/en-us/library/bb897553.aspx)
·         Open Task Scheduler
§  Right-click Task Scheduler (Local) and select Create Task
§  Give the task a name - Rest BITS Jobs
§  Under Security options Change the user to the local SYSTEM account
§  Enable Run with highest privileges
§  On the Actions tab select New...
§  Set up the new Action
§  Action -Start a Program
§  Program browse to C:\Windows\System32\bitsadmin.exe
§  Add arguments /reset /allusers
§  Click OK
§  On the Settings tab ensure the Allow task to be run on demand option is enabled
·         Run the task
·         Give the task a couple of minutes to run
·         Go back to PowerShell and run Get-BitsTransfer -AllUsers
·         There should now jobs listed in the queue
·         Delete the task from Task Scheduler