Dismount-DiskImage
Dismount-DiskImage
Dismounts a disk image (virtual hard disk or ISO) so that it can no longer be accessed as a disk.
Sintaxis
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>]
Descripción detallada
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
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-DevicePath<String[]>
Specifies the device path of the ISO/VHD file. You cannot use this parameter with the ImagePath parameter.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ImagePath<String[]>
Specifies the path of the ISO or VHD file. You cannot use this parameter with the DevicePath parameter.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
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.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-PassThru
Specifies that the cmdlet should output an object representing the dismounted disk image. By default, this cmdlet does not generate any output.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskImage
You can pipe a DiskImage object to the InputObject parameter.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskImage
If you specify the Passthru parameter, this cmdlet outputs an object that represents the disk image that you dismounted.
Notas
- El objeto
Microsoft.Management.Infrastructure.CimInstance
es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#
) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.
Ejemplos
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