PowerShell Logo Small

Remove-VMHardDiskDrive



This is the built-in help made by Microsoft for the command 'Remove-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.

SYNOPSIS

Deletes a hard disk drive from a virtual machine.

SYNTAX


Remove-VMHardDiskDrive [-VMName] <String> [-ControllerType] <ControllerType> [-ControllerNumber] <Int32> [-ControllerLocation] <Int32> [-ComputerName <String[]>] [-Passthru]
[-Confirm] [-WhatIf] [<CommonParameters>]
Remove-VMHardDiskDrive [-VMHardDiskDrive] <HardDiskDrive[]> [-Passthru] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-VMHardDiskDrive cmdlet deletes a hard disk drive from a virtual machine.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?LinkID=306905

REMARKS

<

Examples


Example 1

PS C:\>Remove-VMHardDiskDrive -VMName TestVM –ControllerType IDE -ControllerNumber 1 -ControllerLocation 0



Removes the virtual hard drive at IDE 1,0 on virtual machine TestVM.




Example 2

PS C:\>Get-VMHardDiskDrive -VMName TestVM –ControllerType IDE -ControllerNumber 1 | Remove-VMHardDiskDrive



Removes all virtual hard drives on IDE controller 1 from virtual machine TestVM.