Skip navigation

Q: What Windows PowerShell cmdlet adds a VHD to a virtual machine in Windows Server 2012?

A: The correct PowerShell cmdlet to use to add a virtual hard disk (VHD) to an existing virtual machine (VM) in Windows Server 2012 is the Add-VMHardDiskDrive cmdlet.

Here's an example showing its use on IDE:

Add-VMHardDiskDrive -VMName <vm name>-ControllerType IDE -ControllerNumber 0 –Path "<vhd path and name>" -ComputerName <server>
TAGS: Windows 7/8
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish