Canceling WSUS download process

bitswindows-server-2012-r2wsus

I recently deployed a WSUS role to a Windows Server 2012 R2 machine. Test operation was successful and it downloaded and distributed a modest selection of updates.

Today, I added a few products to my selection. Then, I clicked the synchronize hyperlink on the dashboard and got engaged in conversation with someone. When I looked back, the dashboard said:

Synchronization Status

Status: Idle
Synchronize Now
Last synchronization result: Succeeded

Download Status

Updates needed files: 6,667
Downloaded 243.00 MB of 4,026,930.930 MB

That's 4 terabytes and 26 gigabytes! I cannot afford to let it download 4 terabytes and 26 gigabytes! (There will be devil to pay! Oh, the bureaucratic horrors…) But there is no stop or cancel button!

I've immediately stopped the BITS and WsusService services and reverted the product selection on the server but I need to cancel this download, without nuking the server and starting new!

Everything I've read on the web about this has been totally useless. The following commands do not work. They return an "Access Denied" error ten times:

bitsadmin /reset /allusers
Get-BitsTransfer -AllUsers | Remove-BitsTransfer

Also it is impossible to stop just the BITS service and leave WsusService on. They depend on each other.

Best Answer

You can do it with the PowerShell cmdlets for WSUS:

(Get-WsusServer).CancelAllDownloads()