Resize-IscsiVirtualDisk

Resize-IscsiVirtualDisk

Resizes an iSCSI virtual disk.

Syntax

Parameter Set: Path
Resize-IscsiVirtualDisk [-Path] <String> [-Size] <UInt64> [-ComputerName <String> ] [-Credential <PSCredential> ] [-PassThru] [ <CommonParameters>]

Parameter Set: InputObject
Resize-IscsiVirtualDisk [-Size] <UInt64> -InputObject <IscsiVirtualDisk> [-ComputerName <String> ] [-Credential <PSCredential> ] [-PassThru] [ <CommonParameters>]

Detaillierte Beschreibung

The Resize-IscsiVirtualDisk cmdlet resizes a virtual disk either by expanding or compacting an existing virtual disk. Virtual disks that use the VHDX format can remain online while the cmdlet resizes them. If the cmdlet resizes an online disk, when the virtual disk is mapped to an iSCSI Target, initiators can continue to access the virtual disk even while the cmdlet resizes it. However, an initiator will not automatically see the resized virtual disk. To get access to the capacity of the expanded virtual disk, the initiator must use the Resize-Partition cmdlet to modify the volume hosted on the virtual disk.

This cmdlet can compact a disk only when the logical unit number (LUN) on the initiator side created some partitions on the LUN, and the compacting process simply shrinks the unallocated part of the LUN.

Parameter

-ComputerName<String>

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.

If you do not specify a value for this parameter, the cmdlet uses the local computer.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-Credential<PSCredential>

Specifies the credentials when connecting to a remote computer.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-InputObject<IscsiVirtualDisk>

Accepts an iSCSI Virtual Disk object from the input pipeline.

Aliasse

Keiner

Erforderlich?

true

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-PassThru

Gibt ein Objekt zurück, das das Element darstellt, mit dem Sie arbeiten. Standardmäßig wird von diesem Cmdlet keine Ausgabe generiert.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Path<String>

Specifies the path of the virtual hard disk (VHDX) file that is associated with the iSCSI virtual disk.
Filter the iSCSI Virtual Disk object using this parameter.

Aliasse

DevicePath

Erforderlich?

true

Position?

1

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-Size<UInt64>

Specifies the size of the resized iSCSI virtual disk.
Note: This parameter takes a number and a unit as input, such as 10GB, 20MB, or 1TB.
If you do not specify this parameter, the cmdlet prompts you for a value. You must enter the value in bytes, without specifying a unit.

Aliasse

Keiner

Erforderlich?

true

Position?

2

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.

  • Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

  • Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk

Beispiele

Example 1: Resize a virtual disk

This command resizes the virtual disk at the path E:\temp\test06.vhdx to 20GB.

PS C:\> Resize-IscsiVirtualDisk –Path "E:\temp\test06.vhdx" –Size 20GB

Verwandte Themen

Resize-Partition

Checkpoint-IscsiVirtualDisk

Convert-IscsiVirtualDisk

Get-IscsiVirtualDisk

Import-IscsiVirtualDisk

New-IscsiVirtualDisk

Remove-IscsiVirtualDisk

Restore-IscsiVirtualDisk

Set-IscsiVirtualDisk