Set-VsanIscsiTarget Command | Vmware PowerCLI Reference

Set-VsanIscsiTarget

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.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Target VsanIscsiTarget[] named
  • pipeline
  • wildcards
Specifies the list of vSAN iSCSI targets you want to modify.
optional AddInitiator String[] named
Specifies the names of the vSAN iSCSI initiators which you want to add to the allowed access list.
optional AuthenticationType VsanIscsiTargetAuthenticationType named
Specifies the authentication type for the iSCSI target.
optional IncomingChapSecret SecureString named
Specifies the CHAP user secret for the target. Applicable when the authentication type is Chap or MutualChap.
optional IncomingChapUser String named
Specifies the CHAP user name for the target. Applicable when the authentication type is Chap or MutualChap.
optional Name String named
Specifies the new name of the vSAN iSCSI target. The name should be unique within a cluster.
optional NetworkInterface String named
Specifies 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.
optional OutgoingChapSecret SecureString named
Specifies the CHAP user secret you want to attach to the initiator. Applicable when the authentication type is MutualChap.
optional OutgoingChapUser String named
Specifies the CHAP user name you want to attach to the initiator. Applicable when the authentication type is MutualChap.
optional RemoveInitiator String[] named
Specifies the names of the vSAN iSCSI initiators which you want to remove from the allowed access list.
optional RunAsync SwitchParameter named
Indicates 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.
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.
optional StoragePolicy SpbmStoragePolicy named
  • wildcards
Specifies the storage policy applied to the vSAN namespace of the iSCSI target.
optional TcpPort Int32 named
Specifies the network port on which the target is accessible. If specified, NetworkInterface should also be specified.

Output

VMware.VimAutomation.Storage.Types.V1.Vsan.Iscsi.VsanIscsiTarget

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.

Related Commands

VsanIscsiInitiatorGroup

This cmdlet retrieves vSAN iSCSI initiator groups.

This cmdlet adds a new vSAN iSCSI initiator group to a cluster.

This cmdlet removes the specified vSAN iSCSI initiator groups from their clusters.

This cmdlet modifies the specified vSAN iSCSI initiator groups.

VsanIscsiInitiatorGroupTargetAssociation

This cmdlet retrieves all pairs of associations between vSAN iSCSI targets and initiator groups, which have access to the corresponding targets.

This cmdlet associates the specified vSAN iSCSI initiator group with specified vSAN iSCSI target to provide access to the target.

This cmdlet removes the specified association of vSAN iSCSI initiator group and target.

VsanIscsiLun

This cmdlet retrieves the vSAN iSCSI LUNs from a cluster or target.

This cmdlet adds a new vSAN iSCSI LUN to a target.

This cmdlet removes vSAN iSCSI LUNs from their iSCSI targets.

This cmdlet modifies the specified vSAN iSCSI LUNs.

VsanIscsiTarget

This cmdlet retrieves vSAN iSCSI targets from clusters.

This cmdlet adds a new vSAN iSCSI target to a cluster.

This cmdlet removes vSAN iSCSI targets form their clusters.

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