Register-IscsiSession

Registers an active iSCSI session to be persistent using the session identifier as input.

Syntax

Register-IscsiSession
        -SessionIdentifier <String[]>
        [-IsMultipathEnabled <Boolean>]
        [-ChapUsername <String>]
        [-ChapSecret <String>]
        [-CimSession <CimSession[]>]
        [-ThrottleLimit <Int32>]
        [-AsJob]
        [-PassThru]
        [<CommonParameters>]
Register-IscsiSession
        -InputObject <CimInstance[]>
        [-IsMultipathEnabled <Boolean>]
        [-ChapUsername <String>]
        [-ChapSecret <String>]
        [-CimSession <CimSession[]>]
        [-ThrottleLimit <Int32>]
        [-AsJob]
        [-PassThru]
        [<CommonParameters>]

Description

The Register-IscsiSession cmdlet registers an existing iSCSI session to make it persistent. Once an iSCSI session is registered, it will automatically attempt to reconnect on reboot.

Note: Registering a connection multiple times will automatically re-establish multiple sessions for use with Multipath I/O (MPIO).

Examples

EXAMPLE 1

PS C:\>Register-IscsiSession -SessionIdentifier fffffa800d008430-4000013700000001

This example registers the iSCSI session with the session ID fffffa800d008430-4000013700000001 to be persistent across reboots.

Parameters

-AsJob

ps_cimcommon_asjob

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ChapSecret

Specifies the CHAP secret to use when establishing a connection authenticated by using CHAP.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ChapUsername

Specifies the user name to use when establishing a connection authenticated by using Mutual CHAP.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Accepts an object from the pipeline as input.

Type:CimInstance[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IsMultipathEnabled

Indicates that the initiator has enabled Multipath I/O (MPIO) and it will be used when logging into the target portal.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Sends items from the interactive window down the pipeline as input to other cmdlets. By default, this cmdlet does not generate any output.

To send items from the interactive window down the pipeline, click to select the items and then click OK. Shift-click and Ctrl-click are supported.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SessionIdentifier

Specifies the session identifier.

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.