DISM Cmdlets

업데이트 날짜: 2015년 4월

적용 대상: Windows 10, Windows Server Technical Preview

Windows PowerShell IT(정보 기술) 전문가를 위한 이 참조 항목에서는 태스크를 스크립팅하고 자동화하는 Windows PowerShell cmdlet 사용에 대한 지원 정보를 제공합니다.

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.

DISM

This topic introduces the DISM cmdlets available in the DISM PowerShell module. This module is available in Windows? 8.1 and . 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 and , 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:

try
    {
       
         Get-WindowsImage -ImagePath E:\images\c.wim
    }
    catch
    {
       $message = "TRAPPED: {0}: '{1}'" -f ($_.Exception.GetType().FullName), ($_.Exception.Message)
        Write-host $message
    }

For more information about error handling, see the about_Try_Catch_Finally.

 

Cmdlet Description

Add-AppxProvisionedPackage

Adds an app package (.appx) that will install for each new user to a Windows image.

Add-WindowsCapability

Installs a Windows capability package on the specified operating system image.

Add-WindowsDriver

Adds a driver to an offline Windows image.

Add-WindowsImage

Adds an additional image to an existing image (.wim) file.

Add-WindowsPackage

Adds a single .cab or .msu file to a Windows image.

Clear-WindowsCorruptMountPoint

Deletes all of the resources that are associated with a mounted image that has been corrupted.

Disable-WindowsOptionalFeature

Disables a feature in a Windows image.

Dismount-WindowsImage

Dismounts a Windows image from the directory that it is mapped to.

Enable-WindowsOptionalFeature

Enables a feature in a Windows image.

Expand-WindowsCustomDataImage

Expands a custom data image.

Expand-WindowsImage

Expands an image to a specified location.

Export-WindowsImage

Exports a copy of the specified image to another file.

Get-AppxProvisionedPackage

Gets information about app packages (.appx) that are set to install for each new user in an image.

Get-WindowsCapability

Gets Windows capabilities for an image or a running operating system.

Get-WindowsDriver

Gets information about drivers in a Windows image.

Get-WindowsEdition

Gets edition information about a Windows image.

Get-WindowsImage

Gets information about a Windows image in a WIM or VHD file.

Get-WindowsImageContent

Displays a list of the files and folders in a specified image.

Get-WindowsOptionalFeature

Gets information about optional features in a Windows image.

Get-WindowsPackage

Gets information about packages in a Windows image.

Mount-WindowsImage

Mounts a Windows image in a WIM or VHD file to a directory on the local computer.

New-WindowsImage

Captures an image of a drive to a new WIM file.

Remove-AppxProvisionedPackage

Removes app packages (.appx) from a Windows image.

Remove-WindowsCapability

Uninstalls a Windows capability package from an image.

Remove-WindowsDriver

Removes a driver from an offline Windows image.

Remove-WindowsImage

Removes the specified volume image from a WIM file that has multiple volume images.

Remove-WindowsPackage

Removes a package from a Windows image.

Repair-WindowsImage

Repairs a Windows image in a WIM or VHD file.

Save-WindowsImage

Applies changes made to a mounted image to its WIM or VHD file.

Set-AppXProvisionedDataFile

Adds custom data into the specified app (.appx) package that has been provisioned in a Windows image.

Set-WindowsEdition

Changes a Windows image to a higher edition.

Set-WindowsProductKey

Sets the product key for the Windows image.

Split-WindowsImage

Splits an existing .wim file into multiple read-only split .wim files.

Use-WindowsUnattend

Applies an unattended answer file to a Windows image.

noteNote
To list all the cmdlets that are available, use the Get-Command –Module Dism cmdlet.

cmdlet에 대한 자세한 내용이나 해당 구문을 확인하려면 Get-Help <cmdlet 이름> cmdlet을 사용하세요. 여기서 <cmdlet 이름>은 연구할 cmdlet의 이름입니다. 자세한 내용을 보려면 다음 cmdlet을 실행할 수 있습니다.

Get-Help <cmdlet 이름> -Detailed
Get-Help <cmdlet 이름> -Examples
Get-Help <cmdlet 이름> -Full

See Also

커뮤니티 추가 항목

추가
표시: