Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Connect-NaHostIscsiTarget


NAME
Connect-NaHostIscsiTarget

SYNOPSIS
Establish a connection to a target discovered by the iSCSI Initiator.

SYNTAX
Connect-NaHostIscsiTarget [-TargetName] <String> [-InitiatorIp <String>] [-P
ersistent] [-HeaderDigest] [-DataDigest] [-EnableMultipath] [-WhatIf] [-Conf
irm] [<CommonParameters>]

Connect-NaHostIscsiTarget [-TargetName] <String> [-InitiatorIp <String>] [-P
ersistent] [-Credential <PSCredential>] [-MutualChap] [-HeaderDigest] [-Data
Digest] [-EnableMultipath] [-RadiusVerify] [-WhatIf] [-Confirm] [<CommonPara
meters>]

Connect-NaHostIscsiTarget [-TargetName] <String> [-InitiatorIp <String>] [-P
ersistent] [-MutualChap] [-HeaderDigest] [-DataDigest] [-EnableMultipath] [-
RadiusGenerate] [-RadiusVerify] [-WhatIf] [-Confirm] [<CommonParameters>]


DESCRIPTION
Establish a connection to a target discovered by the iSCSI Initiator.


PARAMETERS
-TargetName <String>
The Iqn of the target to connect.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-InitiatorIp <String>
Ip address the initiator should use to connect to the target.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Persistent
Specify this flag to add this target to the list of favorite targets. T
he iSCSI Initiator service ensures that all volumes and devices on a fav
orite target are available. It attempts to restore connections to these
targets when this machine restarts.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HeaderDigest
If specified, header digest will be enabled.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DataDigest
If specified, data digest will be enabled.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-EnableMultipath
If specified, multi-path will be enabled for the established connection.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Credential <PSCredential>
The CHAP username/password to use to authenticate the target. If not sp
ecified, no authentication will be used when connecting to the target.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-MutualChap
If specified, mutual CHAP will be used. To use mutual CHAP, an initiato
r CHAP secret must be set on the Configuration page of the iSCSI Initiat
or Properties.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-RadiusVerify
If specified, use RADIUS to authenticate target credentials.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-RadiusGenerate
If specified, use RADIUS to generate user authentication credentials.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Windows.IscsiSessionInfo


NOTES


Category: host

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

C:\PS>Connect-NaHostIscsiTarget iqn.1992-08.com.netapp:sn.135107386


Connect to the target with an Iqn of iqn.1992-08.com.netapp:sn.135107386.


Connections : {fffffa8003bb3018-000000000000001e}
Devices : {\\?\scsi#disk&ven_netapp&prod_lun#1&1c121344&0&000000#{53f
56307-b6bf-11d0-94f2-00a0c91efb8b}, }
NumConnections : 1
NumDevices : 2
SessionId : fffffa8003bb3018-400001370000001f
InitiatorName : iqn.1991-05.com.microsoft:win2k8devrre0
TargetName : iqn.1992-08.com.netapp:sn.135107386


-------------- Example 2 --------------

C:\PS>Get-NaHostIscsiTarget | where { !$_.IsConnected} | Connect-NaHostIscsi
Target -Persistent


Connect to all targets that are currently not connected and add them to the
favorite targets list.


Connections : {fffffa8003bb3018-0000000000000022}
Devices : {\\?\scsi#disk&ven_netapp&prod_lun#1&1c121344&0&000000#{53f
56307-b6bf-11d0-94f2-00a0c91efb8b}, }
NumConnections : 1
NumDevices : 2
SessionId : fffffa8003bb3018-4000013700000023
InitiatorName : iqn.1991-05.com.microsoft:win2k8devrre0
TargetName : iqn.1992-08.com.netapp:sn.135107386

Connections : {fffffa8003bb3018-0000000000000023}
Devices : {\\?\scsi#disk&ven_netapp&prod_lun#1&1c121344&0&000100#{53f
56307-b6bf-11d0-94f2-00a0c91efb8b}}
NumConnections : 1
NumDevices : 1
SessionId : fffffa8003bb3018-4000013700000024
InitiatorName : iqn.1991-05.com.microsoft:win2k8devrre0
TargetName : iqn.1992-08.com.netapp:sn.135107303



RELATED LINKS
Add-NaHostIscsiTargetPortal
Get-NaHostIscsiTarget
Disconnect-NaHostIscsiTarget
Get-NaHostIscsiSession







 Data ONTAP® PowerShell Toolkit