PowerCLI Reference

New-IScsiHbaTarget

Synopsis

This cmdlet creates a new iSCSI HBA target.

Syntax

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