Skip to content

iSCSIInitiator

dscbot edited this page Oct 19, 2024 · 4 revisions

iSCSIInitiator

Parameters

Parameter Attribute DataType Description Allowed Values
NodeAddress Key String Represents the IQN of the discovered target.
TargetPortalAddress Required String Specifies the IP address or DNS name of the target portal.
Ensure Write String Ensures that Target is Absent or Present. Present, Absent
InitiatorPortalAddress Write String Specifies the IP address associated with the target portal.
TargetPortalPortNumber Write UInt16 Specifies the TCP/IP port number for the target portal.
InitiatorInstanceName Write String The name of the initiator instance that the iSCSI initiator service uses to send SendTargets requests to the target portal.
AuthenticationType Write String Specifies the type of authentication to use when logging into the target. None, OneWayCHAP, MutualCHAP
ChapUsername Write String Specifies the user name to use when establishing a connection authenticated by using Mutual CHAP.
ChapSecret Write String Specifies the CHAP secret to use when establishing a connection authenticated by using CHAP.
IsDataDigest Write Boolean Enables data digest when the initiator logs into the target portal.
IsHeaderDigest Write Boolean Enables header digest when the initiator logs into the target portal. By not specifying this parameter, the digest setting is determined by the initiator kernel mode driver.
IsMultipathEnabled Write Boolean Indicates that the initiator has enabled Multipath I/O (MPIO) and it will be used when logging into the target portal.
IsPersistent Write Boolean Specifies that the session is to be automatically connected after each restart.
ReportToPnP Write Boolean Specifies that the operation is reported to PNP.
iSNSServer Write String Specifies the name of an iSNS Server to register this Initiator with.
IsConnected Read Boolean Is the target connected to the server.
ConnectionIdentifier Read String This is the current connection identifier for this target connection.
SessionIdentifier Read String This is the current session identifier for this target session.
IsDiscovered Read Boolean Is the target discovered in this session.
InitiatorNodeAddress Read String The Initiator Node address assigned to this session.
TargetNodeAddress Read String The Target Node address assigned to this session.

Description

This resource is used to add or remove an iSCSI Target Portal and connect it to an iSCSI Target.

Examples

Example 1

This example starts the MSiSCSI service on a cluster node and then configures an iSCSI Target Portal and then connects to the iSCSI Target.

Configuration iSCSIInitiator_ConfigureTargetPortal_Config
{
    Import-DscResource -Module iSCSIDSc

    Node localhost
    {
        Service iSCSIService
        {
            Name        = 'MSiSCSI'
            StartupType = 'Automatic'
            State       = 'Running'
        }

        iSCSIInitiator iSCSIInitiator
        {
            Ensure                 = 'Present'
            NodeAddress            = 'iqn.1991-05.com.microsoft:fileserver01-cluster-target'
            TargetPortalAddress    = '192.168.128.10'
            InitiatorPortalAddress = '192.168.128.20'
            IsPersistent           = $true
            iSNSServer             = 'isns.contoso.com'
            DependsOn              = "[Service]iSCSIService"
        } # End of iSCSIInitiator Resource
    } # End of Node
} # End of Configuration
Clone this wiki locally