Reinitialize Virtual Hard Disk

I have a virtual hard disk (VHD) stored on an external USB drive. The external drive does not have a letter assigned; this is to protect its contents from viral attack. In Hyper-V Manager, I added the VHD to a VM by using the DeviceID of the external drive.
The virtual hard disk successfully appears in disk management of the VM. However, at some point the VHD becomes detached (perhaps due to a backup running on the Hyper-V host) and does not reattach unless I re-add it in the Hyper-V GUI or restart the VM.

Is there a Powershell method to reinitialize the detached VHD? I have tried using "Add-VMHardDiskDrive" but it will not accept the DeviceID in the Path argument. A Powershell command which reattaches the VHD seems better than restarting the VM
every time the backups run.

Read full post . . . .

Go Que Newsroom Categories

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 46 bytes) in /home/content/36/8658336/html/goquecom/wp-includes/wp-db.php on line 1995