PowerShell Logo Small

Add-IscsiVirtualDiskTargetMapping



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

Assigns a virtual disk to an iSCSI target.

SYNTAX


Add-IscsiVirtualDiskTargetMapping [-TargetName] <String> [-Path] <String> [-ComputerName <String>] [-Lun <Int32>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-IscsiVirtualDiskTargetMapping cmdlet assigns a virtual disk to an iSCSI target. Once a virtual disk has been assigned to a target, and
after the iSCSi initiator connects to that target, the iSCSI initiator can access the virtual disk. All of the virtual disks assigned to the
same iSCSI target will be accessible by the connected iSCSI initiator.



<

RELATED LINKS


REMARKS

<

Examples


EXAMPLE 1

PS C:\> Add-IscsiVirtualDiskTargetMapping -TargetName "TargetOne" -DevicePath "E:\Temp\vhd1.vhd"



This example associates the VHD with the path E:\Temp\vhd1.vhd to the target named TargetOne.




EXAMPLE 2

PS C:\> Add-IscsiVirtualDiskTargetMapping -TargetName "TargetOne" -DevicePath "E:\Temp\vhd1.vhd" -Lun 0



This example associates the VHD with the path E:\Temp\vhd1.vhd to the target named TargetOne, and sets the LUN to 0. It is important that
theLUN number for a given target is unique.




EXAMPLE 3

PS C:\> Add-IscsiVirtualDiskTargetMapping –TargetName TestTarget –Path ramdisk:test



This example assigns the ramdisk called test to the target object named TestTarget. When the initiator connects to the TestTarget, it will be
able to access the RAMdisk.