PowerShell Logo Small

Set-VMHardDiskDrive



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

Configures a virtual hard disk.

SYNTAX


Set-VMHardDiskDrive [-VMName] <String> [[-ControllerType] <ControllerType>] [[-ControllerNumber] <Int32>] [[-ControllerLocation] <Int32>] [[-Path] <String>]
[-AllowUnverifiedPaths] [-ComputerName <String[]>] [-DiskNumber <UInt32>] [-MaximumIOPS <UInt64>] [-MinimumIOPS <UInt64>] [-Passthru] [-ResourcePoolName <String>]
[-SupportPersistentReservations <Boolean>] [-ToControllerLocation <Int32>] [-ToControllerNumber <Int32>] [-ToControllerType <ControllerType>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-VMHardDiskDrive [-VMHardDiskDrive] <HardDiskDrive[]> [[-Path] <String>] [-AllowUnverifiedPaths] [-ComputerName <String[]>] [-DiskNumber <UInt32>] [-MaximumIOPS <UInt64>]
[-MinimumIOPS <UInt64>] [-Passthru] [-ResourcePoolName <String>] [-SupportPersistentReservations <Boolean>] [-ToControllerLocation <Int32>] [-ToControllerNumber <Int32>]
[-ToControllerType <ControllerType>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-VMHardDiskDrive cmdlet configures a virtual hard disk.



<

RELATED LINKS


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

REMARKS

<

Examples


Example 1

PS C:\> Set-VMHardDiskDrive -VMName TestVM -Path .\Test.vhd



Configures the hard drive of virtual machine TestVM to use Test.vhd as its media.




Example 2

PS C:\> Get-VMHardDiskDrive -VMName TestVM –ControllerType IDE -ControllerNumber 1 -ControllerLocation 0 | Set-VMHardDiskDrive -ToControllerLocation 1



Moves the virtual hard drive on virtual machine TestVM from IDE 1,0 to IDE 1,1.