Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win10 PowerShell 命令失效後修復:DISM 修復系統映像恢復應用重設功能

編輯:Windows 10 系統介紹

Win10 使用 PowerShell 重設 UWP 應用 (Get-AppXPackage ...) 可修復應用商店應用故障,但若系統元件存放區損壞,PowerShell 指令也會失效。解決方法同 ID 22458:以系統管理員身分執行 DISM 掃描與修復健康狀態,恢復系統映像完整性後,PowerShell 重設功能即可重新運作。

命令提示字元執行DISM

修復指令(須按序執行)

  1. 右鍵「開始」> 「命令提示字元 (系統管理員)」或「Windows Terminal (系統管理員)」。
  2. 執行:dism /online /cleanup-image /scanhealth(掃描,不修復)。
  3. 待完成後執行:dism /online /cleanup-image /restorehealth(自動從 Windows Update 下載健康檔案修復)。
  4. 重開機後,再次嘗試 PowerShell 重設應用指令。

關鍵提醒

  • 兩條指令必須依序執行,第一條未完成不可執行第二條。
  • 需網路連線下載修復檔案;離線環境請用 /source:wim:D:\sources\install.wim:1 指定安裝媒體。
  • 修復後建議同步執行 sfc /scannow 修復受保護系統檔。

為什麼 PowerShell 會失效?

PowerShell 重設應用依賴 AppXDeploymentServer.dll、AppXDeploymentExtensions.dll 等系統元件,若元件存放區損壞導致這些 DLL 缺損/版本錯誤,指令即會報錯或無反應。DISM 從源頭修復元件存放區,間接恢復 PowerShell 功能。

Copyright © Windows教程網 All Rights Reserved