This is the built-in help made by Microsoft for the command 'Add-IscsiVirtualDiskTargetMapping', 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.
Assigns a virtual disk to an iSCSI target.
Add-IscsiVirtualDiskTargetMapping [-TargetName] <String> [-Path] <String> [-ComputerName <String>] [-Credential <PSCredential>] [-Lun <Int32>] [<CommonParameters>]
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.
<
Online Version: http://go.microsoft.com/fwlink/?LinkID=294067
Remove-IscsiVirtualDiskTargetMapping
<
EXAMPLE 1
PS C:\> Add-IscsiVirtualDiskTargetMapping -TargetName "TargetOne" -DevicePath "E:\Temp\vhd1.vhdx"
This example associates the VHD with the path E:\Temp\vhd1.vhdx to the target named TargetOne.
EXAMPLE 2
PS C:\> Add-IscsiVirtualDiskTargetMapping -TargetName "TargetOne" -DevicePath "E:\Temp\vhd1.vhdx" -Lun 0
This example associates the VHD with the path E:\Temp\vhd1.vhdx 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.vhdx
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.