Compartilhar via


Mount-DiskImage

Mount-DiskImage

Mounts a previously created disk image (virtual hard disk or ISO), making it appear as a normal disk.

Sintaxe

Parameter Set: ByImagePath
Mount-DiskImage [-ImagePath] <String[]> [-Access <Access> ] [-AsJob] [-CimSession <CimSession[]> ] [-NoDriveLetter] [-PassThru] [-StorageType <StorageType> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
Mount-DiskImage -InputObject <CimInstance[]> [-Access <Access> ] [-AsJob] [-CimSession <CimSession[]> ] [-NoDriveLetter] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrição detalhada

The Mount-DiskImage cmdlet mounts a previously created disk image (virtual hard disk or ISO), making it appear as a normal disk. This cmdlet requires the full path of the VHD or ISO file. If the file is already mounted, then the cmdlet will display the following error.
-- "The process cannot access the file because it is being used by another process."

To mount a VHD file, administrator privileges is required. Administrator privileges are not needed to mount an ISO file on Windows® 8. On Windows Server® 2012, only an administrator is allowed to mount or eject an ISO file.

To create and mount a VHD on a computer running Hyper-V, use the New-VHD and Mount-VHD cmdlets in the Hyper-V module (which is included in Windows 8 and Windows Server 2012 but not enabled by default). Alternatively, open Disk Management and then choose Create VHD from the Action menu.

Parâmetros

-Access<Access>

Mounts the VHD file in read-only or read-write mode. If this parameter is not used or you specify the Unknown parameter value for the VHD file, the VHD file is mounted in read-write mode.

ISO files are mounted in read-only mode regardless of what parameter value you provide.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-AsJob

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-CimSession<CimSession[]>

Executa o cmdlet em uma sessão remota ou em um computador remoto. Insira um nome do computador ou um objeto de sessão, como a saída de um cmdlet New-CimSession ou Get-CimSession. O padrão é a sessão atual do computador local.

Aliases

Session

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-ImagePath<String[]>

Specifies the path of the VHD or ISO file.

Aliases

nenhuma

Necessário?

true

Posição?

1

Valor padrão

nenhuma

Aceitar entrada do pipeline?

True (ByValue, ByPropertyName)

Aceitar caracteres curinga?

false

-InputObject<CimInstance[]>

Accepts an object from the pipeline as input. This object is a DiskImage CIM object that is exposed by Get-DiskImage cmdlet, which is different from the VirtualHardDisk object output by the New-VHD cmdlet in the Hyper-V module.

Aliases

nenhuma

Necessário?

true

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

True (ByValue)

Aceitar caracteres curinga?

false

-NoDriveLetter

Specifies that no drive letter should be assigned to the VHD or ISO file after mounting.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-PassThru

Retorna um objeto que representa o item com o qual você está trabalhando. Por padrão, este cmdlet não gera saída.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-StorageType<StorageType>

Specifies the storage type of a file: ISO, VHD, VHDx, or Unknown. If the StorageType parameter is not specified or the Unknown type is provided, then the storage type is determined by file extension.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

True (ByPropertyName)

Aceitar caracteres curinga?

false

-ThrottleLimit<Int32>

Especifica o número máximo de operações simultâneas que podem ser estabelecidas para executar o cmdlet. Se esse parâmetro for omitido ou um valor de 0 for inserido, o Windows PowerShell® calculará o limite ideal de restrição para o cmdlet com base no número de cmdlets do CIM que estão em execução no computador. O limite de restrição se aplica somente ao cmdlet atual, e não à sessão ou ao computador.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Confirm

Solicita que você confirme antes de executar o cmdlet.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-WhatIf

Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

<CommonParameters>

Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.

Saídas

O tipo de saída é o tipo de objeto emitido pelo cmdlet.

Observações

  • O objeto Microsoft.Management.Infrastructure.CimInstance é uma classe wrapper que exibe objetos da WMI (Instrumentação de Gerenciamento do Windows). O caminho após o sinal de cerquilha (#) indica o namespace e o nome de classe do objeto subjacente da WMI.

Exemplos

Example 1: Mounting an ISO

This example mounts an ISO by specifying the image path.

PS C:\> Mount-DiskImage -ImagePath "E:\ISO-Files\My US Visit Fall 2010 Pictures.iso"

Tópicos relacionados

Dismount-DiskImage

Get-DiskImage

New-VHD