## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
ChapName | String | Specifies the CHAP initiator name if CHAP is enabled. | false | false
ChapPassword | String | Specifies the CHAP password if CHAP is enabled. | false | false
ChapType | ChapType | 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. | false | false
Confirm | SwitchParameter | If 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. | false | false
InheritChap | Boolean | Indicates that the CHAP setting is inherited from the iSCSI HBA device. | false | false
InheritMutualChap | Boolean | Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA device. | false | false
MutualChapEnabled | Boolean | Indicates that mutual CHAP is enabled. In this case, you must specify the MutualChapPassword parameter as well. | false | false
MutualChapName | String | Specifies the Mutual CHAP initiator name if CHAP is enabled. | false | false
MutualChapPassword | String | Specifies the Mutual CHAP password if CHAP is enabled. | false | false
Server | VIServer[] | 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. | false | false
Target | IScsiHbaTarget[] | 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. | true | true (ByValue)
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

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.