Mount-WindowsImage

Mount-WindowsImage

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

構文

Parameter Set: OfflineIndex
Mount-WindowsImage -ImagePath <String> -Index <UInt32> -Path <String> [-CheckIntegrity] [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-Optimize] [-ReadOnly] [-ScratchDirectory <String> ] [ <CommonParameters>]

Parameter Set: OfflineName
Mount-WindowsImage -ImagePath <String> -Name <String> -Path <String> [-CheckIntegrity] [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-Optimize] [-ReadOnly] [-ScratchDirectory <String> ] [ <CommonParameters>]

Parameter Set: Remount
Mount-WindowsImage -Path <String> -Remount [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-ScratchDirectory <String> ] [ <CommonParameters>]

詳細説明

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.

The Path parameter specifies the location where you want to mount the Windows image.

The ImagePath parameter specifies the location of the WIM or VHD file containing the Windows image you want to mount.

Use the Index or Name parameter to specify which image in a WIM or VHD file that you want to mount. For a VHD file, the Index must be 1.

The Optimize parameter reduces the amount of time it takes to initially mount the image. However, processes that are ordinarily performed during a mount will instead be completed the first time that you access a directory. As a result, there may be an increase in the time that is required to access a directory for the first time after mounting an image using the Optimize parameter.

The Remount parameter mounts an image in a WIM or VHD file that was already mounted at the specified Path, but has become inaccessible for servicing.

The CheckIntegrity parameter detects and tracks .wim file corruption. CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with the Mount-WindowsImage cmdlet.

The CheckIntegrity parameter does not apply to virtual hard disk (VHD) files.

パラメーター

-CheckIntegrity

Detects and tracks .wim file corruption when used with the Dismount-WindowsImage or Save-WindowsImage cmdlet. CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with the Mount-WindowsImage cmdlet. The CheckIntegrity parameter does not apply to virtual hard disk (VHD) files.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-ImagePath<String>

Specifies the location of the WIM or VHD file containing the Windows image you want to mount.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-Index<UInt32>

Specifies the index number of a Windows image in a WIM or VHD file. For a VHD file, the Index must be 1.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-LogLevel<LogLevel>

ログに表示される最大出力レベルを指定します。既定のログ レベルは 3 です。指定できる値は次のとおりです。1 = エラーのみ2 = エラーと警告3 = エラー、警告、情報4 = これらすべての情報に加え、デバッグ出力

Aliases

LL

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-LogPath<String>

ログ出力先の完全パスとファイル名を指定します。設定しなかった場合、既定値の %WINDIR%\Logs\Dism\dism.log が使用されます。Windows PE の既定のディレクトリは RAMDISK スクラッチ領域 (32 MB) です。ログ ファイルは自動的にアーカイブされます。アーカイブされたログ ファイルはファイル名に .bak が追加されて保存され、新たなログ ファイルが生成されます。ログ ファイルがアーカイブされるたびに、.bak ファイルが上書きされます。ドメインに参加していないネットワーク共有を使う場合、DISM ログのパスを設定する前に、ドメイン資格情報を指定して net use コマンドを使ってアクセス許可を設定します。

Aliases

LP

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-Name<String>

Specifies the name of an image in a WIM or VHD file.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-Optimize

Reduces the amount of time it takes to initially mount the image. However, processes that are ordinarily performed during a mount will instead be completed the first time that you access a directory. As a result, there may be an increase in the time that is required to access a directory for the first time after mounting an image using the Optimize parameter.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-Path<String>

Specifies the location on your local computer where you want to mount the Windows image.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-ReadOnly

Specifies that the image should be mounted with read-only permissions.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-Remount

Mounts an image in a WIM or VHD file that was already mounted at the specified Path, but has become inaccessible for servicing.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-ScratchDirectory<String>

サービスの実行中、ファイルを展開するときに使用する一時ディレクトリを指定します。このディレクトリは、ローカルに存在する必要があります。指定しなかった場合、\Windows\%Temp% ディレクトリが使用され、DISM を実行するたびに、16 進値のサブディレクトリ名がランダムに生成されます。スクラッチ ディレクトリ内の項目は、各操作後に削除されます。インストール用のパッケージ (.cab または .msu ファイル) を展開するためのスクラッチ ディレクトリとしてネットワーク共有場所を使用することは避けてください。サービス中に一時的に使用するファイルの展開先として使用するディレクトリは、ローカル ディレクトリにする必要があります。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • System.String[]
  • Microsoft.Dism.Commands.ImageObject
  • Microsoft.Dism.Commands.ImageInfoObject

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • Microsoft.Dism.Commands.ImageObject

使用例

Example 1: Mount an image from the install.vhd file to a directory

This command mounts the Windows image contained in the install.vhd file to the c:\offline directory.

PS C:\> Mount-WindowsImage –ImagePath "c:\imagestore\install.vhd" –Index 1 –Path "c:\offline"

Example 2: Mount an image at an index of a file with read-only privileges

This command mounts the Windows image at index 2 of the install.wim file to the c:\offline ddirectory with read-only privileges.

PS C:\> Mount-WindowsImage –ImagePath "c:\imagestore\install.wim" –Index 2 -Path "c:\offline" –ReadOnly

Example 3: Mount an image at an index of a file

This command mounts the Windows image at index 2 of the install.wim file to the c:\offline directory with a quicker initial mount time. Additional operations may be slower.

PS C:\> Mount-WindowsImage –ImagePath "c:\imagestore\install.wim" –Index 2 -Path "c:\offline" –Optimize

Example 4: Remounts an image previously mounted to a directory that is inaccessible

This command remounts a Windows image that has already been mounted to the c:\offline directory but has become inaccessible for servicing.

PS C:\> Mount-WindowsImage –Path "c:\offline" -Remount

関連項目

Dismount-WindowsImage

Save-WindowsImage

Get-WindowsImage

Repair-WindowsImage