PowerCLI Reference

Set-VsanIscsiTarget

Synopsis

This cmdlet modifies the settings of the specified vSAN iSCSI targets.

Syntax

Set-VsanIscsiTarget [-Target] <VsanIscsiTarget[]> [-Name <String>] [-NetworkInterface <String>] [-TcpPort <Int32>] [-AuthenticationType <VsanIscsiTargetAuthenticationType>] [-IncomingChapUser <String>] [-IncomingChapSecret <SecureString>] [-OutgoingChapUser <String>] [-OutgoingChapSecret <SecureString>] [-StoragePolicy <SpbmStoragePolicy>] [-AddInitiator <String[]>] [-RemoveInitiator <String[]>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VsanIscsiTarget
New-VsanIscsiTarget
Remove-VsanIscsiTarget

Detailed Description

This cmdlet modifies the settings of the specified vSAN iSCSI targets. The cmdlet first adds and then removes the initiators if specified. After those operations are completed, other reconfigurations can occur.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
TargetVsanIscsiTarget[]Specifies the list of vSAN iSCSI targets you want to modify.truetrue (ByValue)
AddInitiatorString[]Specifies the names of the vSAN iSCSI initiators which you want to add to the allowed access list.falsefalse
AuthenticationTypeVsanIscsiTargetAuthenticationTypeSpecifies the authentication type for the iSCSI target.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
IncomingChapSecretSecureStringSpecifies the CHAP user secret for the target. Applicable when the authentication type is Chap or MutualChap.falsefalse
IncomingChapUserStringSpecifies the CHAP user name for the target. Applicable when the authentication type is Chap or MutualChap.falsefalse
NameStringSpecifies the new name of the vSAN iSCSI target. The name should be unique within a cluster.falsefalse
NetworkInterfaceStringSpecifies the VMkernel network interface which handles the iSCSI traffic. This parameter accepts an object of type HostVMKernelVirtualNic by silently converting it to the string name by using ArgumentTransformationAttribute.falsefalse
OutgoingChapSecretSecureStringSpecifies the CHAP user secret you want to attach to the initiator. Applicable when the authentication type is MutualChap.falsefalse
OutgoingChapUserStringSpecifies the CHAP user name you want to attach to the initiator. Applicable when the authentication type is MutualChap.falsefalse
RemoveInitiatorString[]Specifies the names of the vSAN iSCSI initiators which you want to remove from the allowed access list.falsefalse
RunAsyncSwitchParameterIndicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console.falsefalse
ServerVIServer[]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.falsefalse
StoragePolicySpbmStoragePolicySpecifies the storage policy applied to the vSAN namespace of the iSCSI target.falsefalse
TcpPortInt32Specifies the network port on which the target is accessible. If specified, NetworkInterface should also be specified.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The modified VsanIscsiTarget objects

Notes

Examples

-------------- Example 1 --------------

Set-VsanIscsiTarget -Target $target -Name "NewName" -AddInitiator "initiator1-iqn", "initiator2-iqn" -RemoveInitiator "initiator3-iqn"

Renames the $target vSAN iSCSI target to "NewName" and adds iSCSI initiators with IQN "initiator1-iqn" and "initiator2-iqn" to iSCSI target. The command removes iSCSI initiator with IQN "initiator3-iqn" from the iSCSI target.


Copyright © VMware, Inc. All rights reserved.