PowerCLI Reference

New-IScsiHbaTarget

Synopsis

This cmdlet 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

This cmdlet 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
AddressStringSpecifies the address of the new iSCSI HBA target. Passing multiple values to this parameter is obsolete.truefalse
PortInt32Specifies the TCP port of the target.falsefalse
IScsiNameStringSpecifies the iSCSI name of the target. It can be specified only for Static targets.falsefalse
ChapNameStringSpecifies a CHAP authentication name for the new target.falsefalse
ChapPasswordStringSpecifies a CHAP authentication password for the new target.falsefalse
ChapTypeChapTypeSpecifies 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
InheritChapBooleanIndicates that the CHAP setting is inherited from the iSCSI HBA.falsefalse
InheritMutualChapBooleanIndicates that the Mutual CHAP setting is inherited from the iSCSI HBA.falsefalse
IScsiHbaIScsiHbaSpecifies the iSCSI HBA for which you want to create the new target. Passing multiple values to this parameter is obsolete.truetrue (ByValue)
MutualChapEnabledBooleanIndicates that Mutual CHAP is enabled.falsefalse
MutualChapNameStringSpecifies a Mutual CHAP authentication name for the new target.falsefalse
MutualChapPasswordStringSpecifies a Mutual CHAP authentication password for the new target.falsefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
TypeIScsiHbaTargetTypeSpecifies the type of the target. The valid values are Static and Send.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The newly created IScsiHbaTarget object

Notes

CHAP configuration is supported only on vCenter Server/ESX 4.1 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 © VMware, Inc. All rights reserved.