< Back

Set-VsanIscsiTarget

Sun Jan 19, 2020 7:21 pm

NAME Set-VsanIscsiTarget



SYNOPSIS

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





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>] [-Confirm] [-WhatIf] [<CommonParameters>]





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

-AddInitiator <String[]>

Specifies the names of the vSAN iSCSI initiators which you want to add to the allowed access list.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AuthenticationType <VsanIscsiTargetAuthenticationType>

Specifies the authentication type for the iSCSI target.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IncomingChapSecret <SecureString>

Specifies the CHAP user secret for the target. Applicable when the authentication type is Chap or MutualChap.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IncomingChapUser <String>

Specifies the CHAP user name for the target. Applicable when the authentication type is Chap or MutualChap.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the new name of the vSAN iSCSI target. The name should be unique within a cluster.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NetworkInterface <String>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-OutgoingChapSecret <SecureString>

Specifies the CHAP user secret you want to attach to the initiator. Applicable when the authentication type is

MutualChap.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-OutgoingChapUser <String>

Specifies the CHAP user name you want to attach to the initiator. Applicable when the authentication type is

MutualChap.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RemoveInitiator <String[]>

Specifies the names of the vSAN iSCSI initiators which you want to remove from the allowed access list.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RunAsync [<SwitchParameter>]

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.



Required? false

Position? named

Default value False

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



-StoragePolicy <SpbmStoragePolicy>

Specifies the storage policy applied to the vSAN namespace of the iSCSI target.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Target <VsanIscsiTarget[]>

Specifies the list of vSAN iSCSI targets you want to modify.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-TcpPort <Int32>

Specifies the network port on which the target is accessible. If specified, NetworkInterface should also be

specified.



Required? false

Position? named

Default value None

Accept pipeline input? False

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



Required? false

Position? named

Default value False

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

The modified VsanIscsiTarget objects







NOTES









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

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

Get-VsanIscsiTarget

New-VsanIscsiTarget

Remove-VsanIscsiTarget