Skip to content

Latest commit

 

History

History
143 lines (100 loc) · 5.1 KB

dism.md

File metadata and controls

143 lines (100 loc) · 5.1 KB

Deployment Image Servicing and Management (DISM) Cmdlets

A curated list of Deployment Image Servicing and Management cmdlets. The Deployment Image Servicing and Management platform is used to mount and service Windows images.

Clear-WindowsCorruptMountPoint

The Clear-WindowsCorruptMountPoint cmdlet deletes all the resources associated with a mounted image that has been corrupted. For more information, see Clear-WindowsCorruptMountPoint.

Clear-WindowsCorruptMountPoint

Dismount-WindowsImage

The Dismount-WindowsImage cmdlet either saves or discards the changes to a Windows image and then dismounts the image. For more information, see Dismount-WindowsImage.

Dismount-WindowsImage -Path "C:\offline" -Discard
Dismount-WindowsImage -Path "C:\offline" -Save -CheckIntegrity

Expand-WindowsImage

The Expand-WindowsImage cmdlet applies an image to a specified location. For more information, see Expand-WindowsImage.

Expand-WindowsImage -ImagePath "C:\provisioning\images\install.wim" -Index 1 -ApplyPath "D:\" -CheckIntegrity -Verify
Expand-WindowsImage -ImagePath "C:\provisioning\images\install.wim" -Name "Windows 11 Home" -ApplyPath "D:\" -CheckIntegrity -Verify

Export-WindowsImage

The Export-WindowsImage cmdlet exports a copy of the specified image to another image file. For more information, see Export-WindowsImage.

Note

This cmdlet does not support the "recovery" compression type. Use dism.exe instead.

Export-WindowsImage -DestinationImagePath "C:\provisioning\images\export\install.wim" -SourceImagePath "C:\provisioning\images\install.wim" -SourceIndex 1 -CheckIntegrity -CompressionType "max"
Export-WindowsImage -DestinationImagePath "C:\provisioning\images\export\install.wim" -SourceImagePath "C:\provisioning\images\install.wim" -SourceIndex 1 -CheckIntegrity -CompressionType "max" -DestinationName "Custom"

Get-AppxProvisionedPackage

The Get-AppxProvisionedPackage cmdlet gets information about app packages (.appx) in an image that are set to install for each new user. For more information, see Get-AppxProvisionedPackage.

Tip

For information about app packages (.appx) that are not provisioned, use the Get-AppxPackage cmdlet instead.

Get-AppxProvisionedPackage -Path "C:\offline"
Get-AppxProvisionedPackage -Online

Get-WindowsImage

The Get-WindowsImage cmdlet gets information about a Windows image in a WIM or VHD file. For more information, see Get-WindowsImage.

Get-WindowsImage -ImagePath "C:\provisioning\images\install.wim"
Get-WindowsImage -ImagePath "C:\provisioning\images\install.wim" -Index 1
Get-WindowsImage -ImagePath "C:\provisioning\images\install.wim" -Name "Windows 11 Home"
Get-WindowsImage -Mounted

Mount-WindowsImage

The Mount-WindowsImage cmdlet maps a Windows image in a WIM or VHD file to the specified directory so that it is accessible for servicing. For more information, see Mount-WindowsImage.

Mount-WindowsImage -Path "C:\offline" -ImagePath "C:\provisioning\images\install.wim" -Index 1 -CheckIntegrity
Mount-WindowsImage -Path "C:\offline" -ImagePath "C:\provisioning\images\install.wim" -Name "Windows 11 Home" -CheckIntegrity
Mount-WindowsImage -Path "C:\offline" -ImagePath "C:\provisioning\images\install.wim" -Index 1 -ReadOnly -CheckIntegrity

Repair-WindowsImage

The Repair-WindowsImage cmdlet repairs a Windows image in a WIM or VHD file. For more information, see Repair-WindowsImage.

Repair-WindowsImage -Path 'C:\offline' -CheckHealth
Repair-WindowsImage -Path 'C:\offline' -ScanHealth
Repair-WindowsImage -Path 'C:\offline' -RestoreHealth
Repair-WindowsImage -Path "C:\offline" -StartComponentCleanup -ResetBase
Repair-WindowsImage -Online -StartComponentCleanup -ResetBase

Split-WindowsImage

The Split-WindowsImage cmdlet creates the .swm files in the specified directory, naming each file the same as the specified SplitImagePath, but with an appended number. For more information, see Split-WindowsImage.

Split-WindowsImage -ImagePath "C:\provisioning\images\install.wim" -SplitImagePath "C:\provisioning\images\export\install.swm" -FileSize 3072 -CheckIntegrity