Compartilhar via


Dismount-DiskImage

Dismount-DiskImage

Dismounts a disk image (virtual hard disk or ISO) so that it can no longer be accessed as a disk.

Sintaxe

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

Parameter Set: ByDevicePath
Dismount-DiskImage -DevicePath <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-StorageType <StorageType> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

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

Descrição detalhada

The Dismount-DiskImage cmdlet dismounts a disk image (virtual hard disk or ISO) so that it can no longer be accessed as a disk. This cmdlet requires either the full image path of the ISO or VHD file, or the device path.

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

Parâmetros

-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

-DevicePath<String[]>

Specifies the device path of the ISO/VHD file. You cannot use this parameter with the ImagePath parameter.

Aliases

nenhuma

Necessário?

true

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

True (ByPropertyName)

Aceitar caracteres curinga?

false

-ImagePath<String[]>

Specifies the path of the ISO or VHD file. You cannot use this parameter with the DevicePath parameter.

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

-PassThru

Specifies that the cmdlet should output an object representing the dismounted disk image. By default, this cmdlet does not generate any output.

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, 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: Dismount a disk image by path

This example ejects an ISO named My US Visit Fall 2010 Pictures by specifying the image path at E:\ISO-Files.

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

Example 2: Dismount a disk image by device path

This example ejects an ISO by specifying device path for cdrom1. Refer to the Get-DiskImage cmdlet to learn how to find the device path of an ISO or VHD file.

PS C:\> Dismount-DiskImage -DevicePath \\.\CDROM1

Tópicos relacionados

Get-DiskImage

Mount-DiskImage