PowerShell Cómo montar un disco duro virtual (VHD)

Si desea acceder al contenido de un archivo VHD sin tener que ejecutar Virtual PC o Virtual Server, puede hacerlo usando PowerShell y ejecutando un par de comandos desde la línea de comandos.

1. Abra PowerShell.

2. Ingrese y ejecute el siguiente comando:

$ objVHDService = get-wmiobject -class "Msvm_ImageManagementService" -namespace "root \ virtualization" -computername "."

Para montar un archivo VHD:

Ingrese y ejecute el siguiente comando:

$ objVHDService.Mount ("e: \ virtual \ test \ test.vhd")

Donde e: \ virtual \ test \ test.vhd es la ruta al disco duro virtual deseado.

Para desmontar un archivo VHD:

Ingrese y ejecute el siguiente comando:

$ objVHDService.Unmount ("e: \ virtual \ test \ test.vhd")

Donde e: \ virtual \ test \ test.vhd es la ruta al disco duro virtual deseado.