vSphere PowerCLI Reference

New-IScsiHbaTarget

Synopsis

Creates a new iSCSI HBA target.

Syntax

New-IScsiHbaTarget -IScsiHba <IScsiHba[]> [-Address] <String[]> [[-Port] <Int32>] [-Type <IScsiHbaTargetType>] [[-IScsiName] <String>] [-ChapType <ChapType>] [-ChapName <String>] [-ChapPassword <String>] [-MutualChapEnabled [<Boolean>]] [-MutualChapName <String>] [-MutualChapPassword <String>] [-InheritChap [<Boolean>]] [-InheritMutualChap [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-IScsiHbaTarget
Remove-IScsiHbaTarget
Set-IScsiHbaTarget
Get-VMHostHba
Set-VMHostHba

Detailed Description

Creates a new iSCSI HBA target. The cmdlet also enables and configures the CHAP (Challenge Handshake Authentication Protocol) authentication settings of the new target.

The Address parameter supports both IPv4 and v6 and also supports the string representations of these types. e.g. ?<address>:<port>?.
The Port parameter is used only when the value of the Address parameter does not contain the port. The default port number is 3260.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
AddressString[]Specify the address of the new iSCSI HBA target.truefalse
PortInt32Specify the TCP port of the target.falsefalse3260
IScsiNameStringSpecify the iSCSI name of the target. It can be specified only for Static targets.falsefalse
ChapNameStringSpecify a CHAP authentication name for the new target.falsefalse<initiator name>
ChapPasswordStringSpecify a CHAP authentication password for the new target.falsefalse
ChapTypeChapTypeSpecify the type of the CHAP (Challenge Handshake Authentication Protocol) you want the new target to use. The valid values are Prohibited, Discouraged, Preferred, and Required.falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
InheritChapBooleanIndicate that the CHAP setting is inherited from the iSCSI HBA.falsefalse
InheritMutualChapBooleanIndicate that the Mutual CHAP setting is inherited from the iSCSI HBA.falsefalse
IScsiHbaIScsiHba[]Specify the iSCSI HBA for which you want to create the new target.truetrue (ByValue)
MutualChapEnabledBooleanIndicate that Mutual CHAP is enabled.falsefalse
MutualChapNameStringSpecify a Mutual CHAP authentication name for the new target.falsefalse<initiator name>
MutualChapPasswordStringSpecify a Mutual CHAP authentication password for the new target.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
TypeIScsiHbaTargetTypeSpecify the type of the target. The valid values are Static and Send.falsefalseSend
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

IScsiHbaTarget

Notes

CHAP configuration is supported only on vCenter Server/ESX 4.0 and later.

Examples

-------------- Example 1 --------------

$hba = Get-VMHost | Get-VMHostHba -Type iScsi

New-IScsiHbaTarget -IScsiHba $hba -Address 10.23.84.73

Creates a new target with IP address 10.23.84.73 on the specified iSCSI HBA device.

-------------- Example 2 --------------

Get-VMHost | Get-VMHostHba -Type iScsi | New-IScsiHbaTarget -Address "10.23.84.73" -ChapType Preferred -ChapName user -ChapPassword pass

Creates a new target on the provided iSCSI HBA device and configures the CHAP settings of the target.


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.