[This was previously asked on answers.microsoft.com, microsoft.com is so dysfunctional]
I am trying to harden an online cloud server by removing unused Windows components. Specifically, I am trying to remove the printing feature as the server will not be doing anything printing related.
However the DISM command to disable the unwanted feature returns STATUS_SXS_ASSEMBLY_MISSING (mapped to localized English text), most of the generic tricks found for the error code either fail or do nothing, and Bing search lacks the ability to focus the search (because the boolean search operators have been removed).
Commands that don't seem to fix things "SFC /ScanNow" "DISM /Online /Cleanup-Image /RestoreHealth" "dism /online /Cleanup-Image /ScanHealth"
Trying with PowerShell commands also fails.
Primary commands attempted and their output (from an elevated command prompt):
C:\Users\myaccount>dism /online /Disable-Feature /FeatureName:Server-Drivers-Printers
Deployment Image Servicing and Management tool
Version: 10.0.17763.3406
Image Version: 10.0.17763.3650
Disabling feature(s)
[==========================100.0%==========================]
Error: 14081
The referenced assembly could not be found.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
C:\Users\myaccount>type C:\Windows\Logs\CBS\CBS.log | FINDSTR /V /C:", Info "
2022-12-19 17:25:35, Error CSI 00000008@2022/12/19:17:25:35.785 (F) onecore\base\wcp\componentstore\csd_locking.cpp(95): Error STATUS_SXS_ASSEMBLY_MISSING originated in function CCSDirectTransaction::LockComponent expression: (null) [gle=0x80004005]
2022-12-19 17:25:39, Error CSI 00000009 (F) STATUS_SXS_ASSEMBLY_MISSING #40307# from CCSDirectTransaction::OperateEnding at index 0 of 1 operations, disposition 2 [gle=0xd015000c]
2022-12-19 17:25:39, Error CSI 0000000a (F) HRESULT_FROM_WIN32(ERROR_SXS_ASSEMBLY_MISSING) #40149# from Windows::ServicingAPI::CCSITransaction::ICSITransaction_PinDeployment(Flags = 0, a = dual_prnms002.inf, version 10.0.17763.1852, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}, type [l:14]'dualModeDriver', cb = (null), s = (null), rid = 'Package_2893_for_KB5001342~31bf3856ad364e35~amd64~~10.0.1.5.5001342-5310_neutral', rah = '2', manpath = (null), catpath = (null), ed = 0, disp = 0) [gle=0x80073701]
2022-12-19 17:25:39, Error CBS Failed to process single phase execution. [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]
2022-12-19 17:25:44, Error CBS Failed to perform operation. [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]
C:\Users\myaccount>