< Back

Set-IScsiHbaTarget

Sun Jan 19, 2020 7:08 pm

NAME Set-IScsiHbaTarget



SYNOPSIS

This cmdlet modifies the configuration of an iSCSI HBA target.





SYNTAX

Set-IScsiHbaTarget [-ChapName <String>] [-ChapPassword <String>] [-ChapType <ChapType>] [-InheritChap <Boolean>]

[-InheritMutualChap <Boolean>] [-MutualChapEnabled <Boolean>] [-MutualChapName <String>] [-MutualChapPassword

<String>] [-Server <VIServer[]>] -Target <IScsiHbaTarget[]> [-Confirm] [-WhatIf] [<CommonParameters>]





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

-ChapName <String>

Specifies the CHAP initiator name if CHAP is enabled.



Required? false

Position? named

Default value Use the old name if any. Otherwise, use the initiator name.

Accept pipeline input? False

Accept wildcard characters? false



-ChapPassword <String>

Specifies the CHAP password if CHAP is enabled.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InheritChap <Boolean>

Indicates that the CHAP setting is inherited from the iSCSI HBA device.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InheritMutualChap <Boolean>

Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA device.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MutualChapEnabled <Boolean>

Indicates that mutual CHAP is enabled. In this case, you must specify the MutualChapPassword parameter as well.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MutualChapName <String>

Specifies the Mutual CHAP initiator name if CHAP is enabled.



Required? false

Position? named

Default value Use the old name if any. Otherwise, use the initiator name.

Accept pipeline input? False

Accept wildcard characters? false



-MutualChapPassword <String>

Specifies the Mutual CHAP password if CHAP is enabled.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



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



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more modified IScsiHbaTarget objects







NOTES





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



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

Online Version: https://code.vmware.com/doc/preview?id= ... arget.html

Get-IScsiHbaTarget

New-IScsiHbaTarget

Remove-IScsiHbaTarget

Get-VMHostHba

Set-VMHostHba