Monday 13 April 2015

SCCM 2012 R2 - Client Deployment - Client Cannot be Assigned to Site

Problem:
Having installed SCCM 2012 R2 you decide to push out a client to a machine. Watching the ccmsetup.log file (found in C:\windows\ccmsetup\logs), you are pleased to note everything seems to have installed as expected. When you open up control panel on the target machine, however, the "Actions" tab in the Config Manager Properties dialogue box is looking a bit sparse. In fact, the only things showing are 'Machine Policy Retrieval & Evaluation Cycle' and 'User Policy Retrieval & Evaluation Policy':


Next you navigate to the cmm log files on the client (C:\Windows\CCM\Logs) to see what's happening. Firstly you notice there aren't as many log file as usual:


Secondly, when you open LocationServices.log, you notice that the client is still trying to talk to the old site "LSVerifySiteAssignment : Client cannot be assigned to site":

Because the new client is still looking to the old site code, none of the post install ccm client config is being pulled down. The SCCM 2012 client can't talk to the 2007 site. 

Cause:

Something is causing the new client to look to the old site. The answer is fairly obvious in this case as the log file says:

"LSRefreshSiteCode: Group Policy Updates the assigned sitecode <xxx>, which is different than the existing site code <>. Will attempt reassignment."

Here, there is a Group Policy being applied to the machine which is forcing the new SCCM 2012 R2 client to look to the old site. Checking in group policy we find that the 2007 ADM template has been added, configured and applied to the client:


Thus each client will have the following settings configured in their registry under the 
"HKLM\Software\Microsoft\SMS\Mobile Client" registry key:

GPRequestedSiteAssignmentCode            =           S01
GPSiteAssignmentRetryDuration(Hour)      =           60
GPSiteAssignmentRetryInterval(Min)           =           12

Solution:

In theory, all you need to do is either change the setting on the group policy or set it to Not Configured. Since the ADM Template is part of a GPO Policy it should not tattoo the registry (unlike a GPO Preference which would)......

However, in my case simply setting the three settings to Not Configured and then applying the policy to the workstations made no difference to the registry. Thus, when it came to installing the 2012 client, all the workstation clients were still looking back to the old 2007 SCCM server. To fix this, you need to make an additional change in order to remove the three registry keys mentioned previosuly. On your 2007 SCCM server, do the following:
> Open notepad
> Paste the following code in:
reg delete "HKLM\Software\Microsoft\SMS\Mobile Client" /v GPRequestedSiteAssignmentCode /f
reg delete "HKLM\Software\Microsoft\SMS\Mobile Client" /v "GPSiteAssignmentRetryDuration(Hour)" /f

reg delete "HKLM\Software\Microsoft\SMS\Mobile Client" /v "GPSiteAssignmentRetryInterval(Min)" /f
> Save the file into the SCCM software share
> Open the SCCM admin console and create a new collection, program and advertisement to push the batch file out:

> Once the batch file has been deployed to all the workstations, use the admin console for SCCM 2012 R2 to deploy the new client to all workstations
> Sit back and watch all the new clients appear in SCCM 2012 R2

No comments:

Post a Comment