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.
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
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
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
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"
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
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
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
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
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