This is the built-in help made by Microsoft for the command 'Get-VMHardDiskDrive', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Gets the virtual hard disk drives attached to one or more virtual machines.
Get-VMHardDiskDrive [-VMName] <String[]> [-ComputerName <String[]>] [-ControllerLocation <Int32>] [-ControllerNumber <Int32>] [-ControllerType <ControllerType>]
[<CommonParameters>]
Get-VMHardDiskDrive [-VMSnapshot] <VMSnapshot> [-ControllerLocation <Int32>] [-ControllerNumber <Int32>] [-ControllerType <ControllerType>] [<CommonParameters>]
Get-VMHardDiskDrive [-VM] <VirtualMachine[]> [-ControllerLocation <Int32>] [-ControllerNumber <Int32>] [-ControllerType <ControllerType>] [<CommonParameters>]
Get-VMHardDiskDrive [-VMDriveController] <VMDriveController[]> [-ControllerLocation <Int32>] [<CommonParameters>]
The Get-VMHardDiskDrive cmdlet gets the virtual hard disk drives attached to one or more virtual machines.
<
Online Version: http://go.microsoft.com/fwlink/?LinkID=306852
<
Example 1
PS C:\>Get-VMHardDiskDrive –VMName TestVM
Gets the virtual hard drives from virtual machine TestVM.
Example 2
PS C:\>Get-VM –Name TestVM | Get-VMHardDiskDrive –ControllerType IDE –ControllerNumber 1
Gets the virtual hard drives from IDE controller 1 of virtual machine TestVM.
Example 3
PS C:\>Get-VMIdeController –VMName TestVM –ControllerNumber 1 –ComputerName Development | Get-VMHardDiskDrive
Gets the virtual hard drives from IDE controller 1 of virtual machine TestVM located on Hyper-V host Development.
Example 4
PS C:\>Get-VMSnapshot –VMName Test –Name 'Before applying updates' | Get-VMHardDrive
Gets the virtual hard drives from snapshot Before applying updates of virtual machine TestVM.