PowerCLI Reference

Set-IScsiHbaTarget

Synopsis

This cmdlet modifies the configuration of an iSCSI HBA target.

Syntax

Set-IScsiHbaTarget -Target <IScsiHbaTarget[]> [-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
New-IScsiHbaTarget
Remove-IScsiHbaTarget
Get-VMHostHba
Set-VMHostHba

Detailed Description

This cmdlet modifies the configuration of an iSCSI HBA target. The cmdlet modifies the CHAP and Digest properties of an iSCSI HBA target. You must specify at least one of the CHAP-related (or Mutual CHAP) parameters. Otherwise, an error message is displayed.

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. If you set ChapType to Discouraged, Preferred, or Required, then you must specify the ChapPassword parameter as well.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 device.falsefalse
InheritMutualChapBooleanIndicates that the Mutual CHAP setting is inherited from the iSCSI HBA device.falsefalse
MutualChapEnabledBooleanIndicates that mutual CHAP is enabled. In this case, you must specify the MutualChapPassword parameter as well.falsefalse
MutualChapNameStringSpecifies the Mutual CHAP initiator name if CHAP is enabled.falsefalse
MutualChapPasswordStringSpecifies the Mutual CHAP password if 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
TargetIScsiHbaTarget[]Specifies the iSCSI HBA target you want to configure. To identify the target, you can provide an IScsiTarget object or use an <Address>:<Port> string.truetrue (ByValue)
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 IScsiHbaTarget objects

Notes

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

Examples

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

Get-IScsiHbaTarget -Address "10.23.84.73" -Type Static | Set-IScsiHbaTarget -ChapType Prohibited

Retrieves the targets of type Static on the specified address and sets their CHAP type to Prohibited.

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

$target = Get-IScsiHbaTarget -Address "10.23.84.73" -Type Send

Set-IScsiHbaTarget -Target $target -ChapType Required -ChapPassword pass1 -MutualChapEnabled -MutualChapPassword pass2

Modifies the CHAP and Mutual CHAP settings of the targets of type Send on the specified address.


Copyright © VMware, Inc. All rights reserved.