vSphere PowerCLI Reference



Configures the CHAP properties of the given iSCSI HBAs.


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

Detailed Description

Configures the CHAP properties of the given iSCSI HBAs.
If (Mutual)ChapType is set to a value different from ?Prohibited?, (Mutual)ChapPassword must be set.
ChapType, MutualChapType, MutualChapName, MutualChapPassword ? these are only available on 4.0 or later.
Note: for ESX 3.5 or older ? setting ChapType to a value different from Prohibited will enable Chap authentication and in the output object ChapType property will have a value ?Required?.
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.


NameTypeDescriptionRequired?Pipeline InputDefault Value
ChapNameStringSpecify the CHAP initiator name if CHAP is enabled.falsefalseUse the old name if any. Otherwise, use the initiator name.
ChapPasswordStringSpecify the CHAP password if CHAP is enabled.falsefalse
ChapTypeChapTypeSpecify 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$true
IScsiHbaIScsiHba[]Specify the iSCSI HBA device you want to configure.truetrue (ByValue)
IScsiNameStringSpecify a new name for the host HBA device.falsefalse
MutualChapEnabledBooleanIndicate that Mutual CHAP authorization is enabled.falsefalse
MutualChapNameStringSpecify the Mutual CHAP initiator name if Mutual CHAP is enabled.falsefalseUse the old name if any. Otherwise, use the initiator name.
MutualChapPasswordStringSpecify the Mutual CHAP password if Mutual CHAP is enabled.falsefalse
ServerVIServer[]Specify the vSphere servers 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
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type



The ChapType, MutualChapType, MutualChapName, and MutualChapPassword parame ters are supported only on vCenter Server/ESX 4.0 or later. For ESX 3.5 or older, if you give the ChapType parameter a value different from "Prohibited", CHAP authentication is enabled and the value of the Chap Type property of the output object will be ?Required?.


-------------- 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 © 1998 - 2011 VMware, Inc. All rights reserved.