Win10 使用 PowerShell 執行 Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} 重置應用程式時失效,改用 DISM 離線/線上修復元件儲存區可解決底層損毀問題。

dism /online /cleanup-image /scanhealth
dism /online /cleanup-image /restorehealth
/scanhealth:掃描元件儲存區是否有損毀,不進行修復。/restorehealth:自動從 Windows Update 下載健康檔案替換損毀元件 (需網路連線)。/source:wim:D:\sources\install.wim:1 /limitaccess 指定安裝媒體來源。sfc /scannow 無法修復的檔案損毀 (DISM 修復層級更深,包含 WinSxS 元件儲存區)。若 /restorehealth 仍報錯 (如 0x800f081f),嘗試:
dism /online /cleanup-image /startcomponentcleanup
dism /online /cleanup-image /restorehealth /source:wim:E:\sources\install.wim:1 /limitaccess
(E: 為 Win10 安裝媒體磁碟機代號,:1 為映像索引,可用 dism /get-wiminfo /wimfile:E:\sources\install.wim 查詢)。
DISM 修復元件儲存區是解決 Win10 應用程式生態系統損毀的核心手段,建議納入系統維護常規工具箱。