Set-IScsiHbaTarget Command | Vmware PowerCLI Reference

Set-IScsiHbaTarget

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.

Syntax

Set-IScsiHbaTarget
-Target < IScsiHbaTarget[] >
[-ChapName < String > ]
[-ChapPassword < String > ]
[-ChapType < ChapType > ]
[-InheritChap < Boolean > ]
[-InheritMutualChap < Boolean > ]
[-MutualChapEnabled < Boolean > ]
[-MutualChapName < String > ]
[-MutualChapPassword < String > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Target IScsiHbaTarget[] named
  • pipeline
  • wildcards
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.
optional ChapName String named
Specifies the CHAP initiator name if CHAP is enabled.
optional ChapPassword String named
Specifies the CHAP password if CHAP is enabled.
optional ChapType ChapType named
Specifies 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.
optional InheritChap Boolean named
Indicates that the CHAP setting is inherited from the iSCSI HBA device.
optional InheritMutualChap Boolean named
Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA device.
optional MutualChapEnabled Boolean named
Indicates that mutual CHAP is enabled. In this case, you must specify the MutualChapPassword parameter as well.
optional MutualChapName String named
Specifies the Mutual CHAP initiator name if CHAP is enabled.
optional MutualChapPassword String named
Specifies the Mutual CHAP password if CHAP is enabled.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.

Output

VMware.VimAutomation.ViCore.Types.V1.Host.Storage.IScsiHbaTarget

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.

Related Commands

IScsiHbaTarget

This cmdlet retrieves the available iSCSI HBA targets.

This cmdlet creates a new iSCSI HBA target.

This cmdlet removes targets from their iSCSI HBAs.

This cmdlet modifies the configuration of an iSCSI HBA target.