PowerShell Logo Small

New-IscsiVirtualDisk



This is the built-in help made by Microsoft for the command 'New-IscsiVirtualDisk', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 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

Creates an iSCSI virtual disk with the specified file path and size.

SYNTAX


New-IscsiVirtualDisk [-Path] <String> [-Size] <UInt64> [-ComputerName <String>] [-Description <String>] [<CommonParameters>]
New-IscsiVirtualDisk [-Path] <String> [-ComputerName <String>] [-Description <String>] -ParentPath <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-IscsiVirtualDisk cmdlet creates a new iSCSI Virtual Hard Disk (VHD) object with the specified file path and size. After the iSCSI VHD
object has been created, the virtual disk can be assigned to an iSCSI target. Once a virtual disk has been assigned to a target, and an
initiator connects to that target, the iSCSI initiator can then access the virtual disk after the initiator connects to the target.


If the VHD file path does not exist, then a new VHD file will then be created.

If the VHD file path exists, then the server will return an error. Use the Import-IscsiVirtualDisk cmdlet to import existing VHDs.



<

RELATED LINKS

Import-IscsiVirtualDisk

REMARKS

<

Examples


EXAMPLE 1

PS C:\> New-IscsiVirtualDisk –Path "E:\temp\test.vhd" -Size 10GB



This example creates a fixed VHD with 10GB in size.




EXAMPLE 2

PS C:\> New-IscsiVirtualDisk -ParentPath "E:\temp\test.vhd" -Path "E:\temp\child\diff.vhd"



This example creates a differencing VHD, with the parent path E:\temp\test.vhd and the differencing VHD path is E:\temp\child\diff.vhd.




EXAMPLE 3

PS C:\> New-IscsiVirtualDisk –Path "E:\temp\test.vhd" -Size 10GB -ComputerName "iscsisvr"



This example creates a fixed VHD with the size 10GB at E:\temp\test.vhd on the computer named iscsisvr.




EXAMPLE 4

PS C:\> New-IscsiVirtualDisk –Path ramdisk:test –Size 20MB



This example creates a VHD with the size 20MB. This VHD will not be saved, the VHD will be lost if the wintarget service is restarted or the
system is restarted.