Mount-WindowsImage

Mount-WindowsImage

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

Syntax

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>]

Detaillierte Beschreibung

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.

Parameter

-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.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-ImagePath<String>

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

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

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.

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-LogLevel<LogLevel>

Gibt die maximale Ausgabeebene an, die in den Protokollen angezeigt wird. Die Standardprotokollebene lautet 3. Die zulässigen Werte lauten wie folgt:1 = nur Fehler2 = Fehler und Warnungen3 = Fehler, Warnungen und Informationen4 = alle zuvor genannten Informationen sowie Debugausgabe

Aliase

LL

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-LogPath<String>

Gibt den vollständigen Pfad und den Namen der Protokolldatei an. Wenn nicht festgelegt, lautet der Standardwert %WINDIR%\Logs\Dism\dism.log.. In Windows PE ist das Standardverzeichnis der RAMDISK-Speicherbereich, der 32 MB klein sein kann. Die Protokolldatei wird automatisch archiviert. Die archivierte Protokolldatei wird mit der Dateierweiterung BAK an den Dateinamen angehängt und eine neue Protokolldatei wird generiert. Bei jeder Archivierung der Protokolldatei wird die BAK Datei überschrieben. Wenn Sie eine Netzwerkfreigabe verwenden, die nicht Mitglied einer Domäne ist, verwenden Sie den Befehl "net use" zusammen mit Domänenanmeldeinformationen, um Zugriffsberechtigungen festzulegen, bevor Sie den Protokollpfad für das DISM-Protokoll festlegen.

Aliase

LP

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-Name<String>

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

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

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.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-Path<String>

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

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-ReadOnly

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

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

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.

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-ScratchDirectory<String>

Gibt ein temporäres Verzeichnis an, das beim Extrahieren von Dateien während der Wartung verwendet wird. Das Verzeichnis muss lokal vorhanden sein. Wenn nicht angegeben, wird das\Windows\%Temp%-Verzeichnis mit einem Unterverzeichnisnamen eines zufällig generierten Hexadezimalwerts bei jeder Ausführung von DISM verwendet. Elemente im Scratchverzeichnis werden nach jedem Vorgang gelöscht. Sie sollten keinen Netzwerkfreigabe-Speicherort als Scratchverzeichnis verwenden, um ein Paket (CAB- oder MSU-Datei) für die Installation zu erweitern. Das Verzeichnis für das Extrahieren von Dateien für die temporäre Verwendung während der Wartung sollte ein lokales Verzeichnis sein.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.

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

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

  • Microsoft.Dism.Commands.ImageObject

Beispiele

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

Verwandte Themen

Dismount-WindowsImage

Save-WindowsImage

Get-WindowsImage

Repair-WindowsImage