Add-IscsiVirtualDiskTargetMapping

Add-IscsiVirtualDiskTargetMapping

Assigns a virtual disk to an iSCSI target.

구문

Parameter Set: Default
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.

매개 변수

-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.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Credential<PSCredential>

Specifies the credentials when connecting to a remote computer.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Lun<Int32>

Specifies the logical unit number (LUN) associated with the virtual disk. By default, the lowest available LUN number will be assigned.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Path<String>

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

별칭

DevicePath

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-TargetName<String>

Specifies the name of the iSCSI target.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • None

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • None

예제

EXAMPLE 1

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

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

EXAMPLE 2

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.

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

EXAMPLE 3

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.

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

관련 항목

Remove-IscsiVirtualDiskTargetMapping