Due to a recent update in forum policy, the question author now is not able to accept their own answers.
I have written a brief summary of this issue.
Please feel free to accept it as the answer to the question to help other community members.
Thanks for the sharing!
Issue Symptom:
While installing Exchange 2016 CU22, you get the following error message:
Performance counter names and help text failed to unload. Unlodctr exited with error code '1224'.
In Event Viewer you get the following alerts:
Unloading the performance counter strings for service MSExchange AD Performance (MSExchange AD Performance) failed. The first DWORD in the Data section contains the error code.
In Exchange setup log you get the following error messages:
1 Updating performance counter strings for WorkloadManagementPerformanceCounters.ini
1 Updating performance counter strings for WorkloadPerformanceCounters.ini
1 Updating performance counter strings for WsPerformanceCounters.ini
1 Finished updating performance counter strings
1 [ERROR] Performance counter names and help text failed to unload. Unlodctr exited with error code '1224'.
1 [ERROR] Performance counter names and help text failed to unload. Unlodctr exited with error code '1224'.
1 [ERROR] Performance counter names and help text failed to unload. Unlodctr exited with error code '1224'
Solution:
Restored the VM from backup, to bring it back to original state (previous CU installation),
Uninstalled all windows updates from past few days
Started all Exchange services manually multiple times while latest CU upgrade was in progress. (Including winmgmt, W3Svc, IIS, filtering and Net.Tcp port sharing service).
Installed latest CU and Security updates
Updated\patched windows again.
Rebooted and worked.