Expand-IscsiVirtualDisk

Expands an iSCSI virtual disk.

Syntax

Expand-IscsiVirtualDisk
      [-Path] <String>
      [-Size] <UInt64>
      [-PassThru]
      [-ComputerName <String>]
      [-Credential <PSCredential>]
      [<CommonParameters>]
Expand-IscsiVirtualDisk
      -InputObject <IscsiVirtualDisk>
      [-Size] <UInt64>
      [-PassThru]
      [-ComputerName <String>]
      [-Credential <PSCredential>]
      [<CommonParameters>]

Description

The Expand-IscsiVirtualDisk cmdlet expands a virtual disk. When the operation is online, the initiator can still access the virtual disk even while it is expanding.

However, the initiator will not automatically see the expanded virtual disk. To get access to the larger virtual disk, the initiator will need to use the Resize-Partition cmdlet to expand the volume hosted on the virtual disk.

Examples

EXAMPLE 1

PS C:\> Expand-IscsiVirtualDisk -Path "E:\temp\test.vhd" -Size 20GB

This example expands the virtual disk with the path E:\temp\test.vhd to 20GB.

Parameters

-ComputerName

Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.

Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Credential

Specifies the credentials when connecting to a remote computer.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-InputObject

Accepts an iSCSI Virtual Disk object from the input pipeline.

Type:IscsiVirtualDisk
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the path of the virtual hard disk (VHD) file that is associated with the iSCSI virtual disk.

Filter the iSCSI Virtual Disk object using this parameter.

Type:String
Aliases:DevicePath
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Size

Specifies the size of the expanded iSCSI virtual disk. Note: This parameter takes a number and a unit as input, such as 10GB, 20MB, or 1TB.

If this parameter is not provided, then a prompt for the input of this parameter with be displayed, as it is a required field. At that time, the value will need to be provided in Bytes; since no unit can be entered at the prompt.

Type:UInt64
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk

Outputs

Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk