vSphere PowerCLI Reference

Set-IScsiHbaTarget

Synopsis

Configures 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

Configures an iSCSI HBA target. The cmdlet modifies the CHAP and Digest properties of a 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
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. 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$true
InheritChapBooleanIndicate that the CHAP setting is inherited from the iSCSI HBA device.falsefalse
InheritMutualChapBooleanIndicate that the Mutual CHAP setting is inherited from the iSCSI HBA device.falsefalse
MutualChapEnabledBooleanIndicate that mutual CHAP is enabled. In this case, you must specify the MutualChapPassword parameter as well.falsefalse
MutualChapNameStringSpecify the Mutual CHAP initiator name if CHAP is enabled.falsefalseUse the old name if any. Otherwise, use the initiator name.
MutualChapPasswordStringSpecify the Mutual CHAP password if 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
TargetIScsiHbaTarget[]Specify 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)
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

IScsiHbaTarget[]

Notes

CHAP configuration is supported only on vCenter Server/ESX 4.0 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 © 1998 - 2012 VMware, Inc. All rights reserved.