DISM Windows PE Servicing Command-Line Options

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

You can mount a Windows Preinstallation Environment (Windows PE) image and add or remove packages, drivers, and language packs in the same way you would any Windows® 8 image using the appropriate driver, package, or international-servicing commands. There are also commands that are specific to a Windows PE image, which can be used to prepare the Windows PE environment, enable profiling, list packages and prepare the Windows PE image for deployment.


Windows PE profiling functionality has been removed in this release.

The base syntax for servicing a Windows PE image is:

DISM.exe/Image:<path_to_image_directory> [dism_global_options] {servicing_option} [<servicing_argument>]

In addition to the Deployment Image Servicing and Management (DISM) options, the following Windows PE servicing options are available for an offline image.

DISM.exe /Image:<path_to_image_directory> [/Get-PESettings | /Get-Profiling | /Get-ScratchSpace | /Get-TargetPath | /Set-ScratchSpace:<size_of_ScratchSpace> | /Set-TargetPath :<target_path> | /Enable-Profiling | /Disable-Profiling | /Apply-Profiles:<path_to_myprofile.txt>]


These options cannot be used with an online, running version of Windows PE. You must specify a Windows PE image using the /Image:<path_to_image_directory> option.

The following table provides a description for how each Windows PE servicing option can be used on a Windows PE image. These options are not case sensitive.

Option Description


Displays a list of Windows PE settings in the Windows PE image. The list includes current profiling state, scratch space settings and target path settings. For example:

Dism /image:C:\test\offline /Get-PESettings


Retrieves the enabled/disabled state of the Windows PE profiling tool. For example:

Dism /image:C:\test\offline /Get-Profiling


Retrieves the configured amount of Windows PE system volume scratch space. This setting represents the amount of writeable space available on the Windows PE system volume when booted in ramdisk mode. For example:

Dism /image:C:\test\offline /Get-ScratchSpace


Retrieves the target path of the Windows PE image. The target path represents a path to the root of the Windows PE image at boot time. For example:

Dism /image:C:\test\offline /Get-TargetPath


Sets the available scratch space, in megabytes. Valid values are 32, 64, 128, 256 and 512. For example:

Dism /image:C:\test\offline /set-ScratchSpace:128

/Set-TargetPath :<target_path>

For hard disk boot scenarios, this option sets the location of the Windows PE image on the disk.

Note the following limitations when setting the target path:

  • The path must be at least three characters and no longer than 32 characters

  • The path must start with a letter (any letter from C to Z)

  • The drive letter must be followed by *:\*

  • The remainder of the path must not contain any invalid characters, such as Unicode characters

  • The path must be absolute, no "." or ".." elements

  • The path must not contain any blank spaces or "\\"

For example:

Dism /image:C:\test\offline /Set-TargetPath:X:\


Enables profiling (file logging) so you can create your own profiles. By default, profiling is disabled. For example:

Dism /image:C:\test\offline /Enable-profiling


Turns off the file logging that is used to create a profile.

Dism /image:C:\test\offline /Disable-Profiling


<path_to_myprofiles.txt> must be a comma separated list of profile file names.

Removes any files from the Windows PE image that are not part of the custom profiles. It also checks the custom profile against the CORE profile to ensure that custom application files and boot-critical files are not deleted. A Windows PE image that has been customized using any profile is not serviceable. However, /Get-Profiling, /Get-TargetPath and /Get-PESettings will work. For example:

Dism /image:C:\test\offline /Apply-Profiles:C:\test\profiles\myprofile.txt


The Windows PE commands can be used to change international settings only in Windows PE 3.0 and Windows PE 4.0 images.

See Also


Wpeutil Command-Line Options
DISM Image Management Command-Line Options


DISM Overview (Deployment Image Servicing and Management)

Other Resources

WinPE for Windows 8: Windows PE 5.0
Deployment Image Servicing and Management (DISM) Command-Line Options