PowerCLI Reference

New-VsanIscsiTarget

Synopsis

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

Syntax

New-VsanIscsiTarget [-AuthenticationType <VsanIscsiTargetAuthenticationType>] -Cluster <Cluster> [-IncomingChapSecret <SecureString>] [-IncomingChapUser <String>] [-IscsiQualifiedName <String>] -Name <String> [-NetworkInterface <String>] [-OutgoingChapSecret <SecureString>] [-OutgoingChapUser <String>] [-RunAsync] [-Server <VIServer[]>] [-StoragePolicy <SpbmStoragePolicy>] [-TcpPort <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
New-VsanIscsiTarget
Get-VsanIscsiTarget
Remove-VsanIscsiTarget
Set-VsanIscsiTarget

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
AuthenticationTypeVsanIscsiTargetAuthenticationTypeSpecifies the authentication type for the vSAN iSCSI target.falseFalse
ClusterClusterSpecifies the vSAN cluster on which you want to create the vSAN iSCSI target.trueTrue (ByValue)
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
IscsiQualifiedNameStringSpecifies the IQN of the target. This parameter is optional and should be unique if specified. If not specified, the server generates a unique IQN.falseFalse
NameStringSpecifies the name of the newly created vSAN iSCSI target. The name should be unique within a cluster.trueFalse
NetworkInterfaceStringSpecifies the VMkernel network interface which handles the iSCSI traffic. If not specified, the default VMkernel network interface defined in iSCSI target service is used. 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
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. If not specified, the default storage policy defined in iSCSI service is used.falseFalse
TcpPortInt32Specifies the network port on which the target is accessible. If specified, NetworkInterface should also be specified. If not specified, and if NetworkInterface is also not specified, the default port specified in iSCSI target service is used. If NetworkInterface is specified, the default port 3260 is used. The server automatically opens the firewall for the specified port.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 newly created VsanIscsiTarget target

Notes

Examples

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

New-VsanIscsiTarget -Name "Target1" -Cluster "vsan-cluster" -NetworkInterface "vmk0"

Creates a new vSAN iSCSI target named "Target1" in the "vsan-cluster" cluster which uses a VMkernel network interface named "vmk0" for traffic.


Copyright © VMware, Inc. All rights reserved.