System. Object[]
The Deployment Image Servicing and Management (DISM) platform is used to mount and service Windows images before deployment. A subset of DISM commands can be used on online Windows images. You can use DISM tools to mount, and get information about, Windows image (.wim) files or virtual hard disks (.vhd or .vhdx). You can also use it to install, uninstall, configure, and update Windows features, packages, and drivers in a Windows image or to change the edition of a Windows image.
This topic introduces the DISM cmdlets available in the DISM PowerShell module. This module is available in Windows 8.1 and Windows Server 2012 R2. On other supported operating systems, you can install the DISM module from the Windows Assessment and Deployment Kit (Windows ADK). For more information about how to use the DISM PowerShell module installed with the ADK, see How to Use DISM in Windows PowerShell.
For Windows 8.1 and Windows Server 2012 R2, Windows PowerShell 4.0 is included in the installation. For other supported versions of Windows and Windows Server, (including Windows 8, Windows 7 SP1, Windows Server 2012, and Windows Server 2008 R2 SP1), you must install Windows Management Framework 4.0. You can download and install Windows Management Framework 4.0 from the Microsoft Download Center.
The DISM platform also includes a command-line tool, DISM.exe, and the DISM API. The command-line tool is available in the Windows Assessment and Deployment Kit (Windows ADK) and includes additional functionality that supports servicing commands for international settings.
You can check for errors when running DISM cmdlets by checking if the $?. If set to True the last operation succeeded. If False the last operation failed. The $LASTEXITCODE contains the exit code of the last Win32 executable run. For example, to check that the Get-WindowsImage cmdlet fails to get information about the Windows image contained in the file, E:\images\c.wim, type the following:
For more information about error handling, see the about_Try_Catch_Finally.
System.Object[]
Adds an app package (.appx) that will install for each new user to a Windows image.
Installs a Windows capability package on the specified operating system image.
Adds a driver to an offline Windows image.
Adds an additional image to an existing image (.wim) file.
Adds a single .cab or .msu file to a Windows image.
Deletes all of the resources associated with a mounted image that has been corrupted.
Disables a feature in a Windows image.
Dismounts a Windows image from the directory it is mapped to.
Enables a feature in a Windows image.
Expands a custom data image.
Applies an image to a specified location.
Exports all third-party drivers from a Windows image to a destination folder.
Exports a copy of the specified image to another image file.
Gets information about app packages (.appx) in an image that will be installed for each new user.
Displays the Windows image file boot (WIMBoot) configuration entries for a specified disk volume.
Gets Windows capabilities for an image or a running operating system.
Displays information about drivers in a Windows image.
Gets edition information about a Windows image.
Gets information about a Windows image in a WIM or VHD file.
Displays a list of the files and folders in a specified image.
Gets information about optional features in a Windows image.
Gets information about packages in a Windows image.
Gets the reserved storage state of the image.
Mounts a Windows image in a WIM or VHD file to a directory on the local computer.
Captures an image of customized or serviced Windows components on a Windows Image File Boot (WIMBoot) configured device.
Captures an image of a drive to a new WIM file.
Configures a Windows image with specified optimizations.
Removes an app package (.appx) from a Windows image.
Uninstalls a Windows capability package from an image.
Removes a driver from an offline Windows image.
Deletes the specified volume image from a WIM file that has multiple volume images.
Removes a package from a Windows image.
Repairs a Windows image in a WIM or VHD file.
Applies changes made to a mounted image to its WIM or VHD file.
Adds custom data into the specified app (.appx) package that has been provisioned in a Windows image.
Changes a Windows image to a higher edition.
Sets the product key for the Windows image.
Sets the reserved storage state of the image.
Splits an existing .wim file into multiple read-only split .wim files.
Updates the Windows image file boot (WIMBoot) configuration entry, associated with either the specified data source ID, the renamed image file path or the moved image file path.
Applies an unattended answer file to a Windows image.
Download Windows 10 Disc Image (ISO File)
Before updating, please refer to the Windows release information status for known issues to confirm your device is not impacted.
You’ve been routed to this page because the operating system you’re using won’t support the Windows 10 media creation tool and we want to make sure you can download Windows 10. To use the media creation tool, visit the Microsoft Software Download Windows 10 page from a Windows 7, Windows 8.1 or Windows 10 device.
You can use this page to download a disc image (ISO file) that can be used to install or reinstall Windows 10. The image can also be used to create installation media using a USB flash drive or DVD.
Make sure you have:
- An internet connection (internet service provider fees may apply).
- Sufficient data storage available on a computer, USB or external drive for the download.
- A blank USB flash drive with at least 5 GB of space or blank DVD (and DVD burner) if you want to create media. We recommend using a blank USB or blank DVD, because any content on it will be deleted.
- When burning a DVD from an ISO file, if you are told the disc image file is too large you will need to use Dual Layer (DL) DVD Media.
Check these things on the PC where you want to install Windows 10:
- 64-bit or 32-bit processor (CPU). You’ll create either the 64-bit or 32-bit version of Windows 10 that’s appropriate for your CPU. To check this on your PC, go to PC info in PC settings or System in Control Panel, and look for System type.
- System requirements. See the system requirements before installing Windows 10. We also recommend that you visit your PC manufacturer’s website for info about updated drivers and hardware compatibility.
- Language in Windows. You’ll need to choose the same language when you install Windows 10. To see what language you’re currently using, go to Time and language in PC settings or Region in Control Panel.
- Edition of Windows. You should also choose the same edition of Windows. To check what edition you’re currently running, go to PC info in PC settings or System in Control Panel, and look for Windows edition. Windows 10 Enterprise isn’t available here. Please see the Volume Licensing Service Center for more information.
- Microsoft Office products. If you just purchased a new device that includes Office 365, we recommend redeeming (installing) Office before upgrading to Windows 10. To redeem your copy of Office, please see Download and install Office 365 Home, Personal, or University on your PC. For more information, check How to upgrade to Windows 10 on new devices that include Office 365.
If you have Office 2010 or earlier and choose to perform a clean install of Windows 10, you will need to locate your Office product key. For tips on locating your product key, check Find your Office 2010 product key or Enter the product key for your Office 2007 program.
Capture, apply, and work with Windows images
The Windows 10 OPK includes an image file, install.wim, which contains the operating system files for your Windows edition.
Starting by deploying this image to a device, add your customizations to it, test, and incorporate those changes into your images, iterating until you’re ready to put the image onto the factory floor.
File formats: WIM, FFU, VHD
To get the Windows image onto a device, you can install Windows using Windows Setup (.wim only) or a deployment script (.wim or .ffu).
Manage multiple variations of your Windows images by combining them into a single .wim file. A single .wim file can take a fraction of the drive space that multiple image files can take.
When you’re ready to manufacture devices, recapture and deploy the image as an .FFU file, because FFUs are faster to apply on a factory floor. FFUs can still be modified like .WIM files, but you can only store one variation of the image at a time.
For more details about the file formats, see WIM vs. VHD vs. FFU: comparing image file formats.
Drives and partitions
- For WIM-based images, you can usually set up partitions during deployment, just before applying the .WIM image file.
- For VHD and FFU-based images, you may need to do some partition setup before you capture the VHD/FFU image file. If the reference and destination drives are different sizes, you may also need to perform setup after you apply the VHD/FFU image file.
Export-Windows Image
Exports a copy of the specified image to another image file.
Syntax
Description
The Export-WindowsImage cmdlet exports a copy of the specified image to another image file. The source and destination files must use the same compression type.
You can also optimize an image by exporting to a new image file with Export-WindowsImage. When you modify an image, DISM stores additional resource files that increase the overall size of the image. Exporting the image will remove unnecessary resource files.
This cmdlet does not apply to virtual hard disk (VHD) files.
Examples
Example 1: Export an image
This command exports the image at Index 1 of the file C:\imagestore\custom.wim to the file c:\imagestore\export.wim with the name Exported Image.
Parameters
Detects and tracks .wim file corruption when used with the Add-WindowsImage, Dismount-WindowsImage, or Save-WindowsImage cmdlet. CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with the Expand-WindowsImage or Mount-WindowsImage cmdlet.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the type of compression used for the initial capture operation. Acceptable values are:
- «max» or «maximum»: Provides the high compression, but takes more time to capture the image
- «fast:» Provides faster image compression, but the resulting files are larger than those compressed by using the maximum option.
- «none»: No compression is used at all. This is the default.
This cmdlet does not support the «recovery» compression type. Use dism.exe instead.
the CompressionType parameter does not apply when you export an image to an existing .wim file, you can only use this CompressionType when you export an image to a new .wim file.
Type: | String |
Position: | Named |
Default value: | «none» |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the location of the exported image file.
Type: | String |
Aliases: | DIP |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the exported image in the exported image file.
Type: | String |
Aliases: | DN |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the maximum output level shown in the logs. The default log level is 3. The accepted values are as follows:
- 1 = Errors only
- 2 = Errors and warnings
- 3 = Errors, warnings, and information
- 4 = All of the information listed previously, plus debug output
Type: | LogLevel |
Aliases: | LL |
Accepted values: | Errors, Warnings, WarningsInfo |
Position: | Named |
Default value: | 3 |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the full path and file name to log to. If not set, the default is %WINDIR%\Logs\Dism\dism.log . In Windows PE, the default directory is the RAMDISK scratch space which can be as low as 32 MB. The log file will automatically be archived. The archived log file will be saved with .bak appended to the file name and a new log file will be generated. Each time the log file is archived the .bak file will be overwritten. When using a network share that is not joined to a domain, use the net use command together with domain credentials to set access permissions before you set the log path for the DISM log.
Type: | String |
Aliases: | LP |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a temporary directory that will be used when extracting files for use during servicing. The directory must exist locally. If not specified, the \Windows\%Temp% directory will be used, with a subdirectory name of a randomly generated hexadecimal value for each run of DISM. Items in the scratch directory are deleted after each operation. You should not use a network share location as a scratch directory to expand a package (.cab or .msu file) for installation. The directory used for extracting files for temporary usage during servicing should be a local directory.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Marks a volume image as being a bootable image. This argument is available only for Windows PE images. Only one volume image can be marked as bootable in a .wim file.
Type: | SwitchParameter |
Aliases: | SB |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the location of the source image file. Must be used in conjunction with -SourceIndex or -SourceName . If the source file is a SWM file, -SplitImageFilePattern is also required.
Type: | String |
Aliases: | SIP |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the index number of a Windows image in a WIM or VHD file. For a VHD file, the Index must be 1.
Type: | UInt32 |
Aliases: | SI |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the source image in the source image file.
Type: | String |
Aliases: | SN |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the location and name of the base split image file.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies that the image will be formatted to install on a Windows image file boot (WIMBoot) system.