Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Expand-SCVirtualDiskDrive

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Expand-SCVirtualDiskDrive

Expands a virtual hard disk attached to a virtual disk drive object.

Syntax

Parameter Set: Default
Expand-SCVirtualDiskDrive [-VirtualDiskDrive] <VirtualDiskDrive> -VirtualHardDiskSizeGB <Int32> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]




Detailed Description

The Expand-SCVirtualDiskDrive cmdlet expands a virtual hard disk attached to a virtual disk drive object in order to increase the total capacity of the virtual hard disk. The virtual machine must be deployed on a host managed by System Center Virtual Machine Manager (VMM) and must be in a stopped state before you can expand the virtual hard disk.

You can use the Expand-SCVirtualDiskDrive cmdlet to expand a Windows-based virtual hard disk file (a .vhd file) attached to a virtual disk drive object on a virtual machine deployed on a Hyper-V host. You can also use this cmdlet to expand a VMware-based virtual hard disk file (a .vmdk file) on a virtual machine deployed on an ESX host. However, you cannot use this cmdlet to expand a virtual hard disk on a virtual machine deployed on a Citrix XenServer host.

For more information about Expand-SCVirtualDiskDrive, type: "Get-Help Expand-SCVirtualDiskDrive -online".

Parameters

-JobGroup<Guid>

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualDiskDrive<VirtualDiskDrive>

Specifies a virtual disk drive object. You can attach either a virtual hard disk (for a virtual machine on any host) or a pass-through disk (for a virtual machine on a Hyper-V host or an ESX host) to a virtual disk drive object.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VirtualHardDiskSizeGB<Int32>

Specifies, in gigabytes (GB), the size to which a dynamically expanding virtual hard disk will expand.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • VirtualHardDisk

Notes

  • Requires a VMM virtual disk drive object, which can be retrieved by using the Get-SCVirtualDiskDrive cmdlet.

Examples

1. Expand a virtual hard disk attached to a virtual disk drive on a virtual machine.

The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The second command gets the virtual disk drive object located on the first controller ($_.Bus -eq 0) and first slot of that controller ($_.Lun -eq 0) of VM01, and stores the object in the $VirtDiskDrive variable.

The last command expands the size of the virtual hard disk attached to the virtual disk drive to 40 GB.


PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"PS C:\> $VirtDiskDrive = Get-SCVirtualDiskDrive -VM $VM | where {$_.Bus -eq 0 -and $_.Lun -eq 0}PS C:\> Expand-SCVirtualDiskDrive -VirtualDiskDrive $VirtDiskDrive -VirtualHardDiskSizeGB 40

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.