PowerCLI Reference

Set-VMHostHba

Synopsis

This cmdlet configures the CHAP properties of the specified iSCSI HBAs.

Syntax

Set-VMHostHba -IScsiHba <IScsiHba[]> [-IScsiName <String>] [-ChapType <ChapType>] [-ChapName <String>] [-ChapPassword <String>] [-MutualChapEnabled <Boolean>] [-MutualChapName <String>] [-MutualChapPassword <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

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

Detailed Description

This cmdlet configures the CHAP properties of the specified iSCSI HBAs.
If (Mutual)ChapType is set to a value different than ?Prohibited?, (Mutual)ChapPassword must be set.
ChapType, MutualChapType, MutualChapName, MutualChapPassword - these are only available on 4.1 or later.
Note: Run Set-VmHostHba directly against ESX. When Set-VmHostHba is run against vCenter Server, changing the iScsiName property of an iSCSI adapter modifies its AuthenticationCapabilities property.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ChapNameStringSpecifies the CHAP initiator name if CHAP is enabled.falsefalse
ChapPasswordStringSpecifies the CHAP password if CHAP is enabled.falsefalse
ChapTypeChapTypeSpecifies the type of the CHAP authorization. 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
IScsiHbaIScsiHba[]Specifies the iSCSI HBA device you want to configure.truetrue (ByValue)
IScsiNameStringSpecifies a new name for the host HBA device.falsefalse
MutualChapEnabledBooleanIndicates that Mutual CHAP authorization is enabled.falsefalse
MutualChapNameStringSpecifies the Mutual CHAP initiator name if Mutual CHAP is enabled.falsefalse
MutualChapPasswordStringSpecifies the Mutual CHAP password if Mutual CHAP is enabled.falsefalse
ServerVIServer[]Specifies the vCenter Server systems 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
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Zero or more modified IScsiHba objects

Notes

The ChapType, MutualChapType, MutualChapName, and MutualChapPassword parameters are supported only on vCenter Server/ESX 4.1 or later.

Examples

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

Get-VMHostHba -Type iScsi | Set-VMHostHba -ChapType Required -ChapName Admin -ChapPassword pass

Changes the CHAP type of the available iScsi to Required.

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

Set-VMHostHba -IScsiHba $iscsi -MutualChapEnabled $true -ChapType Required -ChapName Admin -ChapPassword pass -MutualChapName Administrator -MutualChapPassword Pass

Enables Mutual CHAP for the iScsi devices stored in the $iscsi variable and changes the CHAP type to Required.


Copyright © VMware, Inc. All rights reserved.