SFC unable to repair Server 2019 Datacenter Terminal Server

dzampino-cmers

Active member
Joined
Feb 2, 2022
Posts
37
Issue seems similar to [SOLVED] - SFC and DISM both failed. I've tried sfc /scannow and dism /online /cleanup-image /restorehealth along with dism /online /cleanup-image /restorehealth /source:wim:x:\sources\install.wim:1 /limitaccess with a WIM file that matches the server build. sfc /scannow reports that everything is okay after that last dism command, but is back to an error after a reboot. I've attached the CBS.log.zip, but below are what I believe to be the relevant errors. I've tried running sfcfix with no script as directed in Windows Update Forum Posting Instructions, but it consistently crashes.

2022-02-02 15:01:00, Info CSI 0000666b Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
Actual: {l:32 b:b45d90e43527e118b400d87486820dd8460912fabd1ef147e654b1afc0d4378c}.
2022-02-02 15:01:00, Info CSI 0000666c [SR] Cannot repair member file [l:20]'LServer_PKConfig.xml' of Microsoft-Windows-TerminalServices-LicenseServer-LRWIZDLL, version 10.0.17763.1, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2022-02-02 15:01:00, Info CSI 0000666d Hashes for file member [l:23]'tls_branding_config.xml' do not match.
Expected: {l:32 ml:4096 b:c3b2a8c679b89829b173cd05bdfa46acb1b28a6d4da26fcf0295387a385a9262}.
Actual: {l:32 b:8e6adaf781147f87780c1dd37e63b529f4a49482d541a7f417fe46458f395047}.
2022-02-02 15:01:00, Info CSI 0000666e [SR] Cannot repair member file [l:23]'tls_branding_config.xml' of Microsoft-Windows-TerminalServices-LicenseServer-TlsBrand, version 10.0.17763.1075, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2022-02-02 15:01:00, Info CSI 0000666f@2022/2/2:21:01:00.138 Primitive installers committed for repair
2022-02-02 15:01:00, Info CSI 00006670 Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
Actual: {l:32 b:b45d90e43527e118b400d87486820dd8460912fabd1ef147e654b1afc0d4378c}.
2022-02-02 15:01:00, Info CSI 00006671 [SR] Cannot repair member file [l:20]'LServer_PKConfig.xml' of Microsoft-Windows-TerminalServices-LicenseServer-LRWIZDLL, version 10.0.17763.1, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2022-02-02 15:01:00, Info CSI 00006672 [SR] This component was referenced by [l:99]'Microsoft-Windows-TerminalServices-Licensing-Package~31bf3856ad364e35~amd64~~10.0.17763.1.Licensing'
2022-02-02 15:01:00, Info CSI 00006673 [SR] This component was referenced by [l:105]'Microsoft-Windows-TerminalServices-Licensing-UI-Package~31bf3856ad364e35~amd64~~10.0.17763.1.Licensing-UI'
2022-02-02 15:01:00, Info CSI 00006674 Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
Actual: {l:32 b:b45d90e43527e118b400d87486820dd8460912fabd1ef147e654b1afc0d4378c}.
2022-02-02 15:01:00, Info CSI 00006675 Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
Actual: {l:32 b:b45d90e43527e118b400d87486820dd8460912fabd1ef147e654b1afc0d4378c}.
2022-02-02 15:01:00, Info CSI 00006676 [SR] Could not reproject corrupted file \??\C:\windows\System32\\LServer_PKConfig.xml; source file in store is also corrupted
2022-02-02 15:01:00, Info CSI 00006677@2022/2/2:21:01:00.169 Primitive installers committed for repair
2022-02-02 15:01:00, Info CSI 00006678@2022/2/2:21:01:00.169 Primitive installers committed for repair
2022-02-02 15:01:00, Info CSI 00006679 Hashes for file member [l:23]'tls_branding_config.xml' do not match.
Expected: {l:32 ml:4096 b:c3b2a8c679b89829b173cd05bdfa46acb1b28a6d4da26fcf0295387a385a9262}.
Actual: {l:32 b:8e6adaf781147f87780c1dd37e63b529f4a49482d541a7f417fe46458f395047}.
2022-02-02 15:01:00, Info CSI 0000667a [SR] Cannot repair member file [l:23]'tls_branding_config.xml' of Microsoft-Windows-TerminalServices-LicenseServer-TlsBrand, version 10.0.17763.1075, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2022-02-02 15:01:00, Info CSI 0000667b [SR] This component was referenced by [l:80]'Package_2574_for_KB5009557~31bf3856ad364e35~amd64~~10.0.1.5.5009557-4761_neutral'
2022-02-02 15:01:00, Info CSI 0000667c [SR] This component was referenced by [l:80]'Package_4157_for_KB5009557~31bf3856ad364e35~amd64~~10.0.1.5.5009557-7624_neutral'
2022-02-02 15:01:00, Info CSI 0000667d [SR] This component was referenced by [l:80]'Package_4993_for_KB5009557~31bf3856ad364e35~amd64~~10.0.1.5.5009557-9046_neutral'
2022-02-02 15:01:00, Info CSI 0000667e Hashes for file member [l:23]'tls_branding_config.xml' do not match.
Expected: {l:32 ml:4096 b:c3b2a8c679b89829b173cd05bdfa46acb1b28a6d4da26fcf0295387a385a9262}.
Actual: {l:32 b:8e6adaf781147f87780c1dd37e63b529f4a49482d541a7f417fe46458f395047}.
2022-02-02 15:01:00, Info CSI 0000667f Hashes for file member [l:23]'tls_branding_config.xml' do not match.
Expected: {l:32 ml:4096 b:c3b2a8c679b89829b173cd05bdfa46acb1b28a6d4da26fcf0295387a385a9262}.
Actual: {l:32 b:8e6adaf781147f87780c1dd37e63b529f4a49482d541a7f417fe46458f395047}.
2022-02-02 15:01:00, Info CSI 00006680 [SR] Could not reproject corrupted file \??\C:\windows\System32\\tls_branding_config.xml; source file in store is also corrupted
2022-02-02 15:01:00, Info CSI 00006681@2022/2/2:21:01:00.185 Primitive installers committed for repair
 

Attachments

I apologise for the delayed response, do you still require assistance with this thread?
 
Rich (BB code):
2022-02-02 15:01:00, Info                  CSI    0000666c [SR] Cannot repair member file [l:20]'LServer_PKConfig.xml' of Microsoft-Windows-TerminalServices-LicenseServer-LRWIZDLL, version 10.0.17763.1, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2022-02-02 15:01:00, Info                  CSI    0000666d Hashes for file member [l:23]'tls_branding_config.xml' do not match.
 Expected: {l:32 ml:4096 b:c3b2a8c679b89829b173cd05bdfa46acb1b28a6d4da26fcf0295387a385a9262}.
 Actual: {l:32 b:8e6adaf781147f87780c1dd37e63b529f4a49482d541a7f417fe46458f395047}.
2022-02-02 15:01:00, Info                  CSI    0000666e [SR] Cannot repair member file [l:23]'tls_branding_config.xml' of Microsoft-Windows-TerminalServices-LicenseServer-TlsBrand, version 10.0.17763.1075, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2022-02-02 15:01:00, Info                  CSI    0000666f@2022/2/2:21:01:00.138 Primitive installers committed for repair
2022-02-02 15:01:00, Info                  CSI    00006670 Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
 Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
 Actual: {l:32 b:b45d90e43527e118b400d87486820dd8460912fabd1ef147e654b1afc0d4378c}.

SFCFix Script
Warning: this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.
  1. Download SFCFix.exe (by niemiro) and save this to your Desktop.
  2. Download the file below, SFCFix.zip, and save this to your Desktop. Ensure that this file is named SFCFix.zip - do not rename it.
  3. Save any open documents and close all open windows.
  4. On your Desktop, you should see two files: SFCFix.exe and SFCFix.zip.
  5. Drag the file SFCFix.zip onto the file SFCFix.exe and release it.
  6. SFCFix will now process the script.
  7. Upon completion, a file should be created on your Desktop: SFCFix.txt.
  8. Copy (Ctrl+C) and Paste (Ctrl+V) the contents of this file into your next post for me to analyse please - put [CODE][/CODE] tags around the log to break up the text.
 

Attachments

Code:
SFCFix version 3.0.2.1 by niemiro.
Start time: 2022-02-15 08:14:33.401
Microsoft Windows Server 10 Build 17763 - amd64
Using .zip script file at C:\Users\adm-david\Desktop\SFCFix.zip [0]




PowerCopy::
Successfully took permissions for file or folder C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml
Successfully took permissions for file or folder C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml

Successfully copied file C:\Users\adm-david\AppData\Local\niemiro\Archive\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml to C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml.
Successfully copied file C:\Users\adm-david\AppData\Local\niemiro\Archive\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml to C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml.

Successfully restored ownership for C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml
Successfully restored permissions on C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml
Successfully restored ownership for C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml
Successfully restored permissions on C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml
PowerCopy:: directive completed successfully.




Successfully processed all directives.
SFCFix version 3.0.2.1 by niemiro has completed.
Currently storing 2 datablocks.
Finish time: 2022-02-15 08:14:34.682
Script hash: xg56OUX8LAgY75Glq0OBi4hvNOvxSV1jNqGgefvkC8E=
----------------------EOF-----------------------
 
Could you please run the following command and then upload the latest CBS log if it fails.

Rich (BB code):
Dism /Online /Cleanup-Image /RestoreHealth
 
You appear to getting the same issue as last time for some reason? Could you please run the SFCFix script again from post #4 and then run SFC afterwards.
 
Rerun. Still getting "Windows Resource Protection found corrupt files but was unable to fix some of them" post-reboot.
 

Attachments

Retrieve Components Hive
1. Navigate to C:\Windows\System32\Config and locate the COMPONENTS file.
2. Please copy this file to your desktop.
Note: If you receive an error that this file is in-use, simply reboot your computer and try again.
3. Right-click on this file on your desktop and select Send To...Compressed (zipped) folder. This will create a file named COMPONENTS.ZIP on your desktop.
4. The file will likely be too large to upload here so please upload to a file sharing service. Examples of services to upload to are Dropbox or OneDrive or SendSpace and then just provide the link in your reply.
 
Step#1 - FRST Fix
NOTICE: This script was written specifically for this user, for use on that particular machine. Running this on another machine may cause damage to your operating system
1. Please download Farbar Recovery Scan Tool and save it to your Desktop.
Note: You need to run the 64-bit Version so please ensure you download that one.
2. Download the attached fixlist.txt and save it to the Desktop.
Note. It's important that both files, FRST64 and fixlist.txt are in the same location or the fix will not work (in this case...the desktop).
3. Run FRST64 by Right-Clicking on the file and choosing Run as administrator.
4. Press the Fix button just once and wait. If for some reason the tool needs a restart, please make sure you let the system restart normally. After that let the tool complete its run.
5. When finished FRST64 will generate a log on the Desktop (Fixlog.txt). Please post the contents of it in your reply.
 

Attachments

Code:
Fix result of Farbar Recovery Scan Tool (x64) Version: 14-02-2022 01
Ran by adm-david (17-02-2022 11:02:14) Run:1
Running from C:\Users\adm-david\Desktop
Loaded Profiles: adm-david & VManch & MSSQL$MICROSOFT##WID
Boot Mode: Normal
==============================================

fixlist content:
*****************
CreateRestorePoint:
Reg: reg load HKLM\COMPONENTS C:\WINDOWS\SYSTEM32\CONFIG\COMPONENTS
Reg: reg add HKLM\COMPONENTS\DerivedData\Components\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202 /v f!lserver_pkconfig.xml_4b3e5be4962e6a22 /t REG_DWORD /d 0x21 /f
*****************

Error: (0) Failed to create a restore point.

========= reg load HKLM\COMPONENTS C:\WINDOWS\SYSTEM32\CONFIG\COMPONENTS =========

The operation completed successfully.



========= End of Reg: =========


========= reg add HKLM\COMPONENTS\DerivedData\Components\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202 /v f!lserver_pkconfig.xml_4b3e5be4962e6a22 /t REG_DWORD /d 0x21 /f =========

The operation completed successfully.



========= End of Reg: =========


==== End of Fixlog 11:02:16 ====
 
I've amended the fix script slightly due to the registry change which we made.

SFCFix Script
Warning: this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.
  1. Download SFCFix.exe (by niemiro) and save this to your Desktop.
  2. Download the file below, SFCFix.zip, and save this to your Desktop. Ensure that this file is named SFCFix.zip - do not rename it.
  3. Save any open documents and close all open windows.
  4. On your Desktop, you should see two files: SFCFix.exe and SFCFix.zip.
  5. Drag the file SFCFix.zip onto the file SFCFix.exe and release it.
  6. SFCFix will now process the script.
  7. Upon completion, a file should be created on your Desktop: SFCFix.txt.
  8. Copy (Ctrl+C) and Paste (Ctrl+V) the contents of this file into your next post for me to analyse please - put [CODE][/CODE] tags around the log to break up the text.
If it fails, then please attach the latest CBS log.
 

Attachments

Code:
SFCFix version 3.0.2.1 by niemiro.
Start time: 2022-02-17 13:46:34.483
Microsoft Windows Server 10 Build 17763 - amd64
Using .zip script file at C:\Users\adm-david\Desktop\SFCFix.zip [0]




PowerCopy::
Successfully took permissions for file or folder C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml
Successfully took permissions for file or folder C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml

WARNING: File C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml was not backed up as that would replace the current backup.
Successfully copied file C:\Users\adm-david\AppData\Local\niemiro\Archive\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml to C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml.
WARNING: File C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml was not backed up as that would replace the current backup.
Successfully copied file C:\Users\adm-david\AppData\Local\niemiro\Archive\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml to C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml.

Successfully restored ownership for C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml
Successfully restored permissions on C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-tlsbrand_31bf3856ad364e35_10.0.17763.1075_none_9c481b71554a77d4\tls_branding_config.xml
Successfully restored ownership for C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml
Successfully restored permissions on C:\windows\WinSxS\amd64_microsoft-windows-t..enseserver-lrwizdll_31bf3856ad364e35_10.0.17763.1_none_f5101f628983b202\LServer_PKConfig.xml
PowerCopy:: directive completed successfully.




Successfully processed all directives.
SFCFix version 3.0.2.1 by niemiro has completed.
Currently storing 2 datablocks.
Finish time: 2022-02-17 13:46:34.811
Script hash: 2FF1SGY7hOWjbT2l6e3Hh+z9ggA6SYBUqxUdzwcgBIo=
----------------------EOF-----------------------
 
Could you please run SFC again? Sorry that's what I meant to say in my previous post.
 
Code:
PS C:\windows\system32> sfc /scannow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection found corrupt files but was unable to fix some of them.
For online repairs, details are included in the CBS log file located at
windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. For offline
repairs, details are included in the log file provided by the /OFFLOGFILE flag.
 

Attachments

Rich (BB code):
2022-02-18 07:34:09, Info                  CSI    00006675 Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
 Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
 Actual: {l:32 b:c5645f3fc7ee69092e01ba0405a9306c43ccadbe42977c7f4fda7b5e7e1ae2f4}.
2022-02-18 07:34:09, Info                  CSI    00006676 Hashes for file member [l:20]'LServer_PKConfig.xml' do not match.
 Expected: {l:32 ml:4096 b:a68ced28a12c6d3a25c153e76217f1830e2d94b9c71e4f9b2ebb2b01335af2b6}.
 Actual: {l:32 b:c5645f3fc7ee69092e01ba0405a9306c43ccadbe42977c7f4fda7b5e7e1ae2f4}.

It at least seems that the tls_branding_config.xml file has now been successfully repaired. Let's try the uncompressed version of LServer_PKConfig.xml file since that is the version which CSI wants. Please follow the same instructions as before and then provide the CBS log if it fails.

This should be a very quick and simple fix so I'm not quite sure why it doesn't isn't accepting the file despite it being the correct one.
 

Attachments

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top