Generate new GUID for SCCM client

Recently I stumbled across multiple VMs with a healthy SCCM client but were showing no activity in the console. They also had a habit of disappearing on their own accord too. After ensuring they were in boundary groups and included in discovery I dug deeper. After an hour of utter confusion I ran a query in the database to check for duplicate GUIDs which lead me to writing the script below.

This will clear any reference of the old GUID and generate a new GUID to enable communication between client and primary site

$ini = 'C:\Windows\SMSCFG.INI'

Stop-Service -Name "ccmexec" -Verbose

if(Test-Path $ini){
    Remove-item -Path $ini -Force -Verbose
} else {
    Write-Host "Could not delete .ini file"
}

Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\SystemCertificates\SMS\Certificates\*" -Force -Verbose

Start-Service -Name "ccmexec" -Verbose

Very simple but brought all my clients back online


Leave a Reply

Your email address will not be published. Required fields are marked *