Deployment Image Servicing and Management (DISM) is a command-line tool used to
service Windows® images offline before deployment.
DISM.exe [dism_options]
{WIM_command} []
DISM.exe {/Image:
| /Online} [dism_options]
{servicing_command} []
DESCRIPTION:
DISM enumerates, installs, uninstalls,
configures, and updates features
and packages in Windows images. The commands
that are available depend
on the image being serviced and whether the
image is offline or running.
WIM COMMANDS:
/Get-MountedWimInfo - Displays information about mounted WIM images.
/Get-WimInfo -
Displays information about images in a WIM file.
/Commit-Wim
- Saves changes to a mounted WIM image.
/Unmount-Wim -
Unmounts a mounted WIM image.
/Mount-Wim - Mounts an image from a WIM file.
/Remount-Wim -
Recovers an orphaned WIM mount directory.
/Cleanup-Wim -
Deletes resources associated with mounted WIM
images
that are corrupt.
Examples :
-------------------------------------------------------------------------------------
/Mount-Wim /WimFile:
{/Index: | /Name:
>}
/MountDir: [/readonly]
Mounts the WIM file to the specified
directory so that it is available for
servicing. /ReadOnly sets the mounted image with
read-only permissions.
Examples:
DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1
/MountDir:C:\test\offline
DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1
/MountDir:C:\test\offline /ReadOnly
-------------------------------------------------------------------------------------
/ScratchDir:
Specifies a temporary directory to be used for
extracting files for
servicing. The directory must exist.
If not set, the temporary directory will be
used.
Example:
DISM.exe /Image:C:\test\offline /scratchdir:D:\Scratch
-------------------------------------------------------------------------------------
DISM.exe /Image:C:\test\offline
/?
-------------------------------------------------------------------------------------
IMAGE
SPECIFICATIONS:
/Online
- Targets the running operating system.
/Image - Specifies the path to the root directory of
an
offline
Windows image.
DISM OPTIONS:
/WinDir
- Specifies the path to the Windows directory.
/SysDriveDir -
Specifies the path to the system-loader file named
BootMgr.
/LogPath -
Specifies the logfile path.
/LogLevel - Specifies the output level shown in the
log (1-4).
/NoRestart - Suppresses automatic reboots and reboot
prompts.
/Quiet - Suppresses all output except for error
messages.
/ScratchDir
- Specifies the path to a scratch directory.
For more
information about these DISM options and their arguments, specify an
option
immediately before /?.
Examples:
DISM.exe /Mount-Wim /?
DISM.exe /ScratchDir /?
DISM.exe /Image:C:\test\offline /?
DISM.exe /Online /?
WINDOWS
EDITION SERVICING COMMANDS:
/Set-ProductKey - Populates the product key into the offline image.
/Get-CurrentEdition - Displays the editions of the specified image.
/Get-StagedEditions - Displays a list of Windows editions that can be
removed
from the specified image.
/Get-TargetEditions - Displays a list of Windows editions that an
image
can be upgraded to.
/Remove-StagedEdition - Removes a staged edition from the image.
/Set-Edition -
Upgrades the Windows image to a higher edition.
UNATTEND
SERVICING COMMANDS:
/Apply-Unattend - Applies an unattend file to an image.
DRIVER
SERVICING COMMANDS:
/Remove-Driver - Removes
driver packages from an offline image.
/Add-Driver
- Adds driver packages to an offline image.
/Get-DriverInfo - Displays information about a specific driver
in
an offline image or a running operating system.
/Get-Drivers -
Displays information about all drivers in
an
offline image or a running operating system.
INTERNATIONAL
SERVICING COMMANDS:
/Set-LayeredDriver - Sets keyboard layered
driver.
/Set-UILang
- Sets the default system UI language that is used
in
the mounted offline image.
/Set-UILangFallback - Sets the fallback default language for the system
UI
in the mounted offline image.
/Set-UserLocale - Sets the user locale in the mounted offline image.
/Set-SysLocale - Sets the
language for non-Unicode programs (also
called
system locale) and font settings in the
mounted
offline image.
/Set-InputLocale - Sets the input locales and keyboard layouts to
use
in the mounted offline image.
/Set-TimeZone - Sets the default time zone in the mounted
offline
image.
/Set-AllIntl -
Sets all international settings in the mounted
offline
image.
/Set-SKUIntlDefaults - Sets all international settings to the default
values
for the specified SKU language in the
mounted
offline image.
/Gen-LangIni -
Generates a new lang.ini file.
/Set-SetupUILang - Defines the default language that will be used
by
setup.
/Get-Intl - Displays information about the
international
settings
and languages.
APPLICATION
SERVICING COMMANDS:
/Check-AppPatch - Displays information if the MSP patches are
applicable
to the mounted image.
/Get-AppPatchInfo - Displays information
about installed MSP patches.
/Get-AppPatches - Displays information about all applied MSP patches
for
all installed applications.
/Get-AppInfo -
Displays information about a specific installed MSI
application.
/Get-Apps - Displays information about all installed
MSI
applications.
PACKAGE
SERVICING COMMANDS:
/Add-Package -
Adds packages to the image.
/Remove-Package - Removes packages from the image.
/Enable-Feature - Enables a specific feature in the image.
/Disable-Feature - Disables a specific feature in the image.
/Get-Packages - Displays information about all packages in
the
image.
/Get-PackageInfo - Displays information about a specific package.
/Get-Features - Displays information about all features in
a package.
/Get-FeatureInfo - Displays information about a specific feature.
For more
information about these servicing commands and their arguments,
specify a
command immediately before /?.
Examples:
------------------------------------------------------------------------------
DISM.exe /Image:C:\test\offline /Apply-Unattend
/?
DISM.exe /Image:C:\test\offline /Get-Features /?
DISM.exe /Online /Get-Drivers /?
/Apply-Unattend:
Applies an unattend.xml file to an offline
image or a running operating
system.
Examples:
DISM.exe /Image:C:\test\offline /Apply-Unattend:C:\unattend.xml
DISM.exe /Online /Apply-Unattend:C:\unattend.xml\
-------------------------------------------------------------------------------
/Get-Features
[/PackagePath:] [/PackageName:]
Displays information about all features found
in a specific package.
If you do not specify a package name or path,
all features in the image will
be listed. /PackagePath can point to either a
.cab file or a folder.
Examples:
DISM.exe /Image:C:\test\offline /Get-Features
DISM.exe /Image:C:\test\offline /Get-Features
/PackagePath:C:\packages\package.cab
DISM.exe /Image:C:\test\offline /Get-Features
/PackageName:Microsoft.Windows.Calc.Demo~6595b6144ccf1df~x86~en~1.0.0.0
---------------------------------------------------------------------------------
/Get-Drivers
[/all]
Displays information about drivers in an
image. Only shows out-of-box drivers
by default. Use /all switch to show all
drivers in the image.
Example:
DISM.exe /Image:C:\test\offline /Get-Drivers
DISM.exe /Image:C:\test\offline /Get-Drivers /all
---------------------------------------------------------------------------------