Monday, March 4, 2013

ConfigMgr 2012 SP1 client not installing

It has been a while since I posted something on my blog. Last week I was in the process of deploying the new ConfigMgr 2012 SP1 client to my virtual servers at home. These servers already had a ConfigMgr 2007 SP2 client installed but the new client push method does a good job upgrading these clients. Unfortunately I encountered a problem with one server. (This server was part of a Windows cluster hosting SQL 2008 R2 and running Windows Server 2008 R2). When looking at the c:\windows\ccmsetup\logs\ccmsetup.log file I noticed this line: Download Update: Copy job has been queued. It would repeat every 5 minutes.

Of course google is your friend and I found bits of information to resolve the issue however not an entire solution. I verified with bitsadmin what the status was of all jobs with the following command:
bitsadmin /list /allusers. (Please run all commands used in the post as Administrator!).

(Or since that command is deprecated use this powershell command: Get-BitsTransfer -AllUsers).
(Please note that above command needs to have import-module bitstransfer loaded!).

The output showed that there were some problems with the job queue.

Now I figured that running Get-BitsTransfer -AllUsers | Remove-BitsTransfer would remove all jobs from the queue. Right.....?? Unfortunately this was not the case because the jobs were owned by the SYSTEM account. Some people would suggest running psexec with the -s command to remove the jobs. I have found this way to be unsuccesful because I ran into a new error message. This time complaining about not being logged on to the network. What I have found to be succesful is this:

Stop the ccmsetup.exe service!

Create a ps1 file like in my case bits.ps1 and add the following 2 lines to it:

import-module bitstransfer
Get-BitsTransfer -AllUsers | Remove-BitsTransfer

Create a batch file containing these lines:

@echo off
powershell -file "path_to_the_file\bits.ps1"
exit

Now open the windows task scheduler. Create a new task. Give it a name.
Now change the running user to the local SYSTEM account. Select run with highest privileges and change the Configure for to the highest possible OS lever available. In my case it was Windows 7, Windows Server 2008R2.

Under the actions tab, add a new program and point to the batch file which you just created. You can leave the rest default and click OK. Now that a new task has been created, just simply run it. It should clear out the bits queue. You can verify with a powershell the command: Get-BitsTransfer -AllUsers or bitsadmin /list /allusers. Once the queue is empty, remove the scheduled task and manually start the ccmsetup.exe service. Monitor the ccmsetup.log file in c:\windows\ccmsetup\logs. It should have no problems downloading the new client components.