ConfigMgr: Updating Client Settings crashes the console

I was trying to update client settings and every time I clicked OK, the console would crash and the settings would not be saved.  I checked the SMSAdminUI.log file, and this had been recorded:

[1, PID:4608][10/26/2022 08:29:21] :System.Management.ManagementException\r\nGeneric failure \r\n   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementObject.Put(PutOptions options)
   at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)\r\nManagementException details:
instance of SMS_ExtendedStatus
{
	CauseInfo = "";
	Description = "CSspClientSettings: SQL_ERROR";
	ErrorCode = 3242722562;
	File = "X:\\bt\\1116398\\repo\\src\\SiteServer\\SDK_Provider\\SMSProv\\sspclientsettings.cpp";
	Line = 129;
	Operation = "PutInstance";
	ParameterInfo = "";
	ProviderName = "ExtnProv";
	SQLMessage = "[42000][6965][Microsoft][SQL Server Native Client 11.0][SQL Server]XML Validation: Invalid content. Expected element(s): 'use-webview2-browser-control','notification-logo'. Found: element 'brand-logo' instead. Location: /*:settings[1]/*:brand-logo[1].";
	SQLSeverity = 16;
	SQLStatus = 6965;
	StatusCode = 2147749889;
};

I found this post that details how to resolve the issue.  According to the post, the issue is that Microsoft “changed the xml formatting in 2111 which breaks old settings with the previous xml formatting”.  I didn’t have to do all the steps detailed in the post, so I will show what I did here.

Go into the client setting and select Software Center:

Click Customize, and the go to the “Tabs” tab:

Select “Display custom tabs with Microsoft Edge WebView2 runtime”:

Click OK, and the click OK a second time to save the client setting.  This will update the xml formatting and fix the issue.  You can then uncheck the box to return to the original setting.

Good Microsoft pages to look for return codes

HTTP Status Codes

WMI Return Codes – typically begin with 0x80041ddd

Win32 Error Codes – beginning with 0x0000dddd

Debug system error codes – information that’s returned with net helpmsg

NTSTATUS Values – lists values starting with 0x0ddddddd, 0x4ddddddd, 0x8ddddddd, 0xCddddddd

Background: I had the following in a ccmsetup.log:

MSI: Module C:\WINDOWS\CCM\StatusAgentProxy.dll failed to register.  HRESULT -1073741205.  Contact your support personnel.

-1073741205 translates to 0xC000026B, so what does that mean?  I decided to compile a list of Microsoft pages with error/exit codes, since I must search for them every time.  The links will probably change, but if they are active for a bit, I can use them while they last.

FYI – 0xC000026B is STATUS_DLL_INIT_FAILED_LOGOFF, {DLL Initialization Failed} The application failed to initialize because the window station is shutting down.

CCMSetup: Failed (0x87d0027e) to send location request to ‘MANAGEMENTPOINT.DOMAIN.NAME’. StatusCode 403, StatusText ‘Client certificate required’

I was trying to install the client on a workstation and got this error:

[CCMHTTP] ERROR: URL=https://MANAGEMENTPOINT.DOMAIN.NAME/ccm_system/request, Port=443, Options=448, Code=0, Text=CCM_E_BAD_HTTP_STATUS_CODE
[CCMHTTP] ERROR INFO: StatusCode=403 StatusText=Client certificate required
Failed (0x87d0027e) to send location request to 'MANAGEMENTPOINT.DOMAIN.NAME'. StatusCode 403, StatusText 'Client certificate required'
Failed to send location message to 'https://MANAGEMENTPOINT.DOMAIN.NAME'. Status text 'Client certificate required'
GetDPLocations failed with error 0x87d0027e
Failed to get DP locations as the expected version from MP 'https://MANAGEMENTPOINT.DOMAIN.NAME'. Error 0x87d0027e
Sending state '101'...
Updating MDM_ConfigSetting.ClientDeploymentErrorCode with value 0
Failed to get client version for sending state messages. Error 0x8004100e
[] Params to send '5.0.9078.1005 Deployment Error: 0x0, '
Sending Fallback Status Point message to 'FALLBACKSTATUSPOINT.DOMAIN.NAME', STATEID='101'.
<ClientDeploymentMessage ErrorCode="0"><Client Baseline="1" BaselineCookie="" Platform="2" Langs=""/></ClientDeploymentMessage>
State message with TopicType 800 and TopicId {159FF73B-B608-4E99-94BA-37445D840D04} has been sent to the FSP
Next retry in 10 minute(s)...

I checked the workstation and it had a certificate, so I then checked to see if the ccmsetup.log showed that it was using it:

That looks correct… so why was this error being thrown? It can’t be a server problem, other clients are working without issue, so I looked through the ccmsetup.log and noticed a message about the workstation being in provisioning mode:

In provisioning mode, server requires SSL, and no authenticator available. Request may fail.

I checked the registry value, and sure enough:

C:\Users\_tdurning\Client>reg query \\WORKSTATION\HKLM\SOFTWARE\Microsoft\CCM\CcmExec /v ProvisioningMode

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\CcmExec
    ProvisioningMode    REG_SZ    true

I changed it to “false”:

reg add \\WORKSTATION\HKLM\SOFTWARE\Microsoft\CCM\CcmExec /v ProvisioningMode /t REG_SZ /d false /f

and then reran ccmsetup.  The client installed successfully.

UPDATE: I just came across this – Microsoft documents the proper way to manually remove provisioning mode:

Invoke-WmiMethod -Namespace root\CCM -Class SMS_Client -Name SetClientProvisioningMode -ArgumentList $false

ConfigMgr: How to identify machines that have duplicate GUIDs

I became aware of some workstations that seemed to have duplicate GUIDs, so I wanted to come up with a method to possibly identify all of them.  For this, I use the v_HS_SYSTEM view, which returns the historical data whenever there is a change to the data returned from the v_GS_SYSTEM view.  According to Microsoft, The view v_GS_SYSTEM has “… information about the active Configuration Manager clients, including domain, name, system role, system type, and more.”

The important thing to note is that if none of that data returned by v_GS_SYSTEM changes, there won’t be any data returned by v_HS_SYSTEM.  For instance, my workstation that was imaged 5 months ago has one row returned by v_GS_SYSTEM and nothing by v_HS_SYSTEM:

It’s not unusual to get one or two rows for a computer returned by v_HS_SYSTEM if the computer’s name was changed.  For example, this machine’s name was changed, and it’s reflected in the views:

What is unusual is if one GUID returns multiple rows for different names.  This can happen if a GUID is duplicated across multiple machines (by disk duplication, for instance) – each time one of those machines returns hardware inventory, ConfigMgr sees it as a name change and the data returned by v_GS_SYSTEM is updated, and the old data is then accessible through v_HS_SYSTEM.

Here is a sample of 29 different names for one GUID.  The count shows the number of times it was changed from that name.

To get the names of machines that might have duplicate GUIDs, I use the following – I add “having count (*) > 1” to eliminate the single computer name changes.

select SMSID0, Name0, SystemRole0, count (*) [Count] from v_HS_SYSTEM
group by SMSID0, Name0, SystemRole0
having count (*) > 1
order by SMSID0, Name0, SystemRole0

That’s not good.

There’s a page on Citrix’s website that shows how to resolve duplicate GUIDs.  I tried solution 2 and it seems to have fixed them:

Solution 2:

Important: delete machine from Configuration Manager.

Execute following on the client:

net stop "SMS Agent Host"
del c:\windows\SMSCFG.ini
certutil –delstore SMS SMS
net start "SMS Agent Host"

I’ve updated the query to show computers names that are in the v_HS_SYSTEM view, but v_r_system shows them as not having the client:

select distinct hs.SMSID0, hs.Name0, s.ResourceID, s.SMS_Unique_Identifier0
from v_HS_SYSTEM hs inner join v_R_System s on s.Name0 = hs.Name0
where hs.SMSID0 in
(
	select SMSID0 from (select distinct SMSID0, Name0 from v_HS_SYSTEM) a
	group by a.SMSID0
	having count (*) > 1
)
and s.SMS_Unique_Identifier0 is null
order by hs.SMSID0, hs.Name0