< Back

New-IScsiHbaTarget

Sun Jan 19, 2020 7:00 pm

NAME 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>]





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

-Address <String>

Specifies the address of the new iSCSI HBA target. Passing multiple values to this parameter is obsolete.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ChapName <String>

Specifies a CHAP authentication name for the new target.



Required? false

Position? named

Default value <initiator name>

Accept pipeline input? False

Accept wildcard characters? false



-ChapPassword <String>

Specifies a CHAP authentication password for the new target.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InheritChap <Boolean>

Indicates that the CHAP setting is inherited from the iSCSI HBA.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InheritMutualChap <Boolean>

Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IScsiHba <IScsiHba>

Specifies the iSCSI HBA for which you want to create the new target. Passing multiple values to this parameter

is obsolete.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-IScsiName <String>

Specifies the iSCSI name of the target. It can be specified only for Static targets.



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MutualChapEnabled <Boolean>

Indicates that Mutual CHAP is enabled.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MutualChapName <String>

Specifies a Mutual CHAP authentication name for the new target.



Required? false

Position? named

Default value <initiator name>

Accept pipeline input? False

Accept wildcard characters? false



-MutualChapPassword <String>

Specifies a Mutual CHAP authentication password for the new target.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Port <Int32>

Specifies the TCP port of the target.



Required? false

Position? 2

Default value 3260

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Type <IScsiHbaTargetType>

Specifies the type of the target. The valid values are Static and Send.



Required? false

Position? named

Default value Send

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

The newly created IScsiHbaTarget object







NOTES





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



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



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... arget.html

Get-IScsiHbaTarget

Remove-IScsiHbaTarget

Set-IScsiHbaTarget

Get-VMHostHba

Set-VMHostHba