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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Address | String | Specifies the address of the new iSCSI HBA target. Passing multiple values to this parameter is obsolete. | true | false
Port | Int32 | Specifies the TCP port of the target. | false | false
IScsiName | String | Specifies the iSCSI name of the target. It can be specified only for Static targets. | false | false
ChapName | String | Specifies a CHAP authentication name for the new target. | false | false
ChapPassword | String | Specifies a CHAP authentication password for the new target. | false | false
ChapType | ChapType | Specifies 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. | false | false
Confirm | SwitchParameter | If 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. | false | false
InheritChap | Boolean | Indicates that the CHAP setting is inherited from the iSCSI HBA. | false | false
InheritMutualChap | Boolean | Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA. | false | false
IScsiHba | IScsiHba | Specifies the iSCSI HBA for which you want to create the new target. Passing multiple values to this parameter is obsolete. | true | true (ByValue)
MutualChapEnabled | Boolean | Indicates that Mutual CHAP is enabled. | false | false
MutualChapName | String | Specifies a Mutual CHAP authentication name for the new target. | false | false
MutualChapPassword | String | Specifies a Mutual CHAP authentication password for the new target. | false | false
Server | VIServer[] | 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. | false | false
Type | IScsiHbaTargetType | Specifies the type of the target. The valid values are Static and Send. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

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.