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