Manage DISM with the Command Prompt / PowerShell


Software: Windows 8 & 10 | Last modified on 2018-06-18


A guide to using the Deployment Image Servicing and Management tool with the Command Prompt or PowerShell.

Repair the installed Windows image


  1. Open the Command Prompt (Admin) or PowerShell (Admin).

  • Execute dism.exe /Online /Cleanup-Image /CheckHealth to check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired.
  • Execute dism.exe /Online /Cleanup-Image /ScanHealth to scan the image for component store corruption.
  • Execute dism.exe /Online /Cleanup-Image /RestoreHealth to scan the image for component store corruption, and then perform repair operations automatically.


View & export installed drivers


  1. Open the Command Prompt (Admin) or PowerShell (Admin).

  • Execute dism.exe /Online /Get-Drivers to display information about all drivers in an offline image or a running operating system.

  • Execute dism.exe /Online /Export-Driver /Destination:Path to export all third-party driver packages from an offline image or a running operating system.
    Example: dism.exe /Online /Export-Driver /Destination:C:\Drivers\Backup
    Replace Path with the location where you want to save the drivers.


Import & export file extension type associations


  1. Open the Command Prompt (Admin) or PowerShell (Admin).

  • Execute dism.exe /Online /Export-DefaultAppAssociations:Path to export the default application associations from a running operating system.
    Example: dism.exe /Online /Export-DefaultAppAssociations:C:\Extensions\Backup.xml
    Replace Path with the location where you want to save the file.

  • Execute dism.exe /Online /Import-DefaultAppAssociations:Path to import a set of default application associations to a Windows image.
    Example: dism.exe /Online /Import-DefaultAppAssociations:C:\Extensions\Backup.xml
    Replace Path with the location where you've saved the file.



Search
Support
Can't find the answer you're looking for? Click here to submit a ticket.