After I deployed security updates via SCCM server, I found some servers couldn’t find the updates. On the SCCM server console, I also saw some servers have no client installed, but I clearly knew I installed them recently. These servers were virtual machines created by other technician in last 2 or 3 months. I remembered that some servers had issue talking to the SCCM server even the client side looked good to me, but SCCM server showed there was no client installed. I did manually install the client and the problem was solved last time. Now the problem came again! So I uninstalled the SCCM client and reinstall it, still same issue.
At the beginning I thought it might be a firewall issue because one of the problematic server was in a separate network behind a firewall. I did work with the network team and fixed the network issue a while ago. There were other 2 problematic servers in the same VLAN with the SCCM server. So didn’t sound like a network issue. When I was checking the server device property I saw a wired thing. The Distinguished Name of server A was the DN of server B! Something was definitely messed up. So I started to check the computer SID and SCCM client ID.
I used PSTools psgetsid.exe to find out computer SID.
I used below PowerShell cmd to get the ClientID.
get-wmiobject -ComputerName ‘SERVERA’ -Namespace root\ccm -Query “Select ClientID from CCM_Client” |Select ClientID
I found they were the same! There were 5 servers have exactly same SID and SCCM ClientID. There was only random one server could talk to the SCCM server. When I run the command to get the ClientID in a different time, I got different ClientID but all 5 servers shared the same ClientID.
The duplicated computer SID might not be a problem if not on a DC. But I definitely need fix the duplicated SCCM client ClientID issue. After read some articles online and decided to apply the fix I found in this online discussion https://www.windows-noob.com/forums/topic/11119-duplicate-guid-in-sccm-2012-r2/
In the article, it suggested to run this query on the SCCM DB server. If you have dups, this will confirm it. Replace “computername” with the problem device and execute.
select * from System_DISC where Name0 like ‘%computername%’
Here are the steps I applied on each server with the duplicated ClientID.
- Open administrative cmd prompt, do a NET STOP CCMEXEC to stop this service
- Open the certificate console for the local computer, delete the two certs displayed in the SMS node (MMC > Certificates > Local Computer)
- Delete the smscfg.ini from C:\windows\
- Ran the sql query against SCCM database using the machine name to clean the db. (see below, change the servername correspondingly).
DECLARE @Name VARCHAR(25)
SET @Name = ‘servername’
DELETE FROM SYSTEM_DISC WHERE Name0 = @Name
DELETE FROM ClientKeyData WHERE SMSID IN (SELECT SMS_Unique_Identifier0 FROM SYSTEM_DISC WHERE Name0 =@Name)
DELETE FROM MachineIdGroupXRef WHERE MachineID IN (SELECT ItemKey FROM SYSTEM_DISC WHERE Name0 = @Name)
DELETE FROM System_AUX_Info WHERE Netbios_Name0 = @Name
DELETE FROM ImportedMachineIdentity WHERE ItemKey IN (SELECT ItemKey FROM SYSTEM_DISC WHERE Name0 = @Name)
- Uninstalled the SCCM client using ccmsetup.exe /uninstall
- Reinstalled the SCCM client.