Getting a ConfigMgr Client's Registered Certificate Thumbprint

When managing a client in a ConfigMgr 2007 hierarchy, it can be difficult to determine what certificate the client is registering with and the client's registration status.  This information is stored in WMI and is sometimes difficult to get access and interpret.  Instead of trying to demonstrate how to do that, I wrote a simple VB script that will print the information to the console.

How to use the script
Copy the script to a machine running the ConfigMgr client. Run the script by using "cscript GetClientCert.vbs". Note: Double clicking the script will not work. The thumbprint returned is the certificate thumbprint the client uses for registering with the site server.
 

Example output

 C:\>cscript GetClientCert.vbs
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Registration Status:  0 = Not Registered, 1 = Pending, 2 = Registered

Certificate Thumbprint: 6471FF40242F9C30C14501FB474955DE8D8595A9

Registration Status   : 2

 

In the example above, you can see  the certificate thumbprint is 6471FF40242F9C30C14501FB474955DE8D8595A9 and the client has a registration status of 2, which means the client has registered.

 

Download the script

Copy the script below into a file called GetClientCert.vbs and save:

 strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\ccm")

Set colItems = objWMIService.ExecQuery("SELECT * FROM CCM_ClientIdentificationInformation")

Wscript.Echo "Registration Status:  0 = Not Registered, 1 = Pending, 2 = Registered"

For Each objItem in colItems
    Wscript.Echo
    Wscript.Echo "Certificate Thumbprint: " & objItem.ReservedString1
    Wscript.Echo "Registration Status   : " & objItem.ReservedUInt1
    Wscript.Echo
Next