PowerShell Logo Small

New-IscsiVirtualDisk



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

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

SYNTAX


New-IscsiVirtualDisk [-Path] <String> [-SizeBytes] <UInt64> [-BlockSizeBytes <UInt32>] [-ComputerName <String>] [-Credential <PSCredential>] [-Description <String>]
[-LogicalSectorSizeBytes <UInt32>] [-PhysicalSectorSizeBytes <UInt32>] [<CommonParameters>]
New-IscsiVirtualDisk [-Path] <String> [-SizeBytes] <UInt64> [-BlockSizeBytes <UInt32>] [-ComputerName <String>] [-Credential <PSCredential>] [-Description <String>]
[-DoNotClearData] [-LogicalSectorSizeBytes <UInt32>] [-PhysicalSectorSizeBytes <UInt32>] -UseFixed [<CommonParameters>]
New-IscsiVirtualDisk [-Path] <String> [[-SizeBytes] <UInt64>] [-BlockSizeBytes <UInt32>] [-ComputerName <String>] [-Credential <PSCredential>] [-Description <String>]
[-PhysicalSectorSizeBytes <UInt32>] -ParentPath <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-IscsiVirtualDisk cmdlet creates a new iSCSI Virtual Hard Disk (VHDX) object with the specified file path and size. After the iSCSI VHDX 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 virtual hard disk file path does not exist, then a new VHDX file will then be created.

If the VHDX file path exists, then the server will return an error. Use the Import-IscsiVirtualDisk cmdlet to import existing virtual hard disks.


If an error is displayed during the creation of the virtual disk, please check the following conditions:

-- An absolute file path must be specified for the Path and ParentPath parameters.

-- The virtual disk file name must have a .vhdx file extension.

-- The VHDX file cannot be a network file, or be in a compressed, sparse, or transacted folder.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=294080
Checkpoint-IscsiVirtualDisk
Convert-IscsiVirtualDisk
Get-IscsiVirtualDisk
Import-IscsiVirtualDisk
Remove-IscsiVirtualDisk
Restore-IscsiVirtualDisk
Set-IscsiVirtualDisk

REMARKS

<

Examples


EXAMPLE 1

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



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




EXAMPLE 2

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



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




EXAMPLE 3

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



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




EXAMPLE 4

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



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