Export-WindowsImage

Export-WindowsImage

Exports a copy of the specified image to another image file.

構文

Parameter Set: InputByFilePathAndIndex
Export-WindowsImage -DestinationImagePath <String> -SourceImagePath <String> -SourceIndex <UInt32> [-CheckIntegrity] [-CompressionType <String> ] [-DestinationName <String> ] [-LogLevel <LogLevel> ] [-LogPath <String> ] [-ScratchDirectory <String> ] [-Setbootable] [-SplitImageFilePattern <String> ] [-WIMBoot] [ <CommonParameters>]

Parameter Set: InputByFilePathAndName
Export-WindowsImage -DestinationImagePath <String> -SourceImagePath <String> -SourceName <String> [-CheckIntegrity] [-CompressionType <String> ] [-DestinationName <String> ] [-LogLevel <LogLevel> ] [-LogPath <String> ] [-ScratchDirectory <String> ] [-Setbootable] [-SplitImageFilePattern <String> ] [-WIMBoot] [ <CommonParameters>]

詳細説明

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.

パラメーター

-CheckIntegrity

Add—WindowsImage、Dismount-WindowsImage、または Save-WindowsImage コマンドレットと共に使用したときに、.wim ファイルの破損を検出して追跡します。CheckIntegrity は、Expand-WindowsImage コマンドレットまたは Mount-WindowsImage コマンドレットと共に使用したときに、.wim ファイルが破損していることを DISM で検出した場合、操作を停止します。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CompressionType<String>

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-DestinationImagePath<String>

Specifies the location of the exported image file.

エイリアス

DIP

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-DestinationName<String>

Specifies the name of the exported image in the exported image file.

エイリアス

DN

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-LogLevel<LogLevel>

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

エイリアス

LL

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-LogPath<String>

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

エイリアス

LP

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ScratchDirectory<String>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Setbootable

ボリューム イメージを起動可能なイメージとしてマークします。この引数は、Windows PE イメージでのみ使用できます。.wim ファイルで起動可能としてマークできるボリューム イメージは 1 つだけです。

エイリアス

SB

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SourceImagePath<String>

Specifies the location of the source image file.

エイリアス

SIP

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SourceIndex<UInt32>

WIM ファイルまたは VHD ファイル内の Windows イメージのインデックス番号を指定します。VHD ファイルの場合、このインデックスは 1 にする必要があります。

エイリアス

SI

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SourceName<String>

Specifies the name of the source image in the source image file.

エイリアス

SN

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SplitImageFilePattern<String>

基本分割イメージ ファイルの場所と名前を指定します。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-WIMBoot

Specifies that the image will be formatted to install on a Windows image file boot (WIMBoot) system.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

<CommonParameters>

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

入力

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

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

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Dism.Commands.OfflineImageObject

Example 1

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.

PS C:\> Export-WindowsImage -SourceImagePath C:\imagestore\custom.wim -SourceIndex 1 -DestinationImagePath c:\imagestore\export.wim -DestinationName "Exported Image"

関連トピック

Dismount-WindowsImage

Expand-WindowsImage

Export-WindowsImage

Get-WindowsImage

Mount-WindowsImage

New-WindowsImage

Remove-WindowsImage

Repair-WindowsImage

Save-WindowsImage

Split-WindowsImage