< Back
Unregister-IscsiSession
Post
NAME Unregister-IscsiSession
SYNOPSIS
Removes an active iSCSI session from being persistent using the session identifier as input.
SYNTAX
Unregister-IscsiSession [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] -SessionIdentifier <String[]> [<CommonParameters>]
Unregister-IscsiSession [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] [<CommonParameters>]
DESCRIPTION
The Unregister-IscsiSession cmdlet removes a registered iSCSI session to prevent it from automatically reconnection on restart.
PARAMETERS
-CimSession [<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-CimSession
or Get-CimSession cmdlet. The default is the current session on the local computer.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-SessionIdentifier <String[]>
Specifies the session identifier.
Required? true
Position? named
Default value none
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ThrottleLimit [<Int32>]
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.
Required? false
Position? named
Default value none
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 (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
None
Example 1: Remove a session
The first command gets information about all iSCSI sessions across all iSCSI connections by using the Get-IscsiSession cmdlet.
PS C:\\>Get-IscsiSession
AuthenticationType : NONE
InitiatorInstanceName : ROOT\\ISCSIPRT\\0000_0
InitiatorNodeAddress : iqn.1991-05.com.contoso:deepcore.contoso.com
InitiatorPortalAddress :
InitiatorSideIdentifier : 400001370001
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsMultipathEnabled : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : fffffa800d008430-4000013700000001
TargetNodeAddress : iqn.1991-05.com.contoso:testiscsi-deepcore-target
TargetSideIdentifier : 0200
AuthenticationType : NONE
InitiatorInstanceName : ROOT\\ISCSIPRT\\0000_0
InitiatorNodeAddress : iqn.1991-05.com.contoso:deepcore.contoso.com
InitiatorPortalAddress :
InitiatorSideIdentifier : 400001370004
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsMultipathEnabled : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : fffffa800d008430-4000013700000002
TargetNodeAddress : iqn.1991-05.com.contoso:testiscsi-deepcore-target
TargetSideIdentifier : 0100
AuthenticationType : NONE
InitiatorInstanceName : ROOT\\ISCSIPRT\\0000_0
InitiatorNodeAddress : iqn.1991-05.com.contoso:deepcore.contoso.com
InitiatorPortalAddress :
InitiatorSideIdentifier : 400001370002
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsMultipathEnabled : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : fffffa800d008430-4000013700000003
TargetNodeAddress : iqn.1991-05.com.contoso:testiscsi-deepcore-target
TargetSideIdentifier : 0300
The second command removes the session that has the specified session ID.
PS C:\\>Unregister-IscsiSession -SessionIdentifier "fffffa800d008430-4000013700000001"
This example gets a list of sessions, and then uses this cmdlet to remove the session.
RELATED LINKS
iSCSI on TechNet
Storage on TechNet
Get-IscsiSession
SYNOPSIS
Removes an active iSCSI session from being persistent using the session identifier as input.
SYNTAX
Unregister-IscsiSession [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] -SessionIdentifier <String[]> [<CommonParameters>]
Unregister-IscsiSession [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] [<CommonParameters>]
DESCRIPTION
The Unregister-IscsiSession cmdlet removes a registered iSCSI session to prevent it from automatically reconnection on restart.
PARAMETERS
-CimSession [<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-CimSession
or Get-CimSession cmdlet. The default is the current session on the local computer.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-SessionIdentifier <String[]>
Specifies the session identifier.
Required? true
Position? named
Default value none
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ThrottleLimit [<Int32>]
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.
Required? false
Position? named
Default value none
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 (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
None
Example 1: Remove a session
The first command gets information about all iSCSI sessions across all iSCSI connections by using the Get-IscsiSession cmdlet.
PS C:\\>Get-IscsiSession
AuthenticationType : NONE
InitiatorInstanceName : ROOT\\ISCSIPRT\\0000_0
InitiatorNodeAddress : iqn.1991-05.com.contoso:deepcore.contoso.com
InitiatorPortalAddress :
InitiatorSideIdentifier : 400001370001
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsMultipathEnabled : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : fffffa800d008430-4000013700000001
TargetNodeAddress : iqn.1991-05.com.contoso:testiscsi-deepcore-target
TargetSideIdentifier : 0200
AuthenticationType : NONE
InitiatorInstanceName : ROOT\\ISCSIPRT\\0000_0
InitiatorNodeAddress : iqn.1991-05.com.contoso:deepcore.contoso.com
InitiatorPortalAddress :
InitiatorSideIdentifier : 400001370004
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsMultipathEnabled : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : fffffa800d008430-4000013700000002
TargetNodeAddress : iqn.1991-05.com.contoso:testiscsi-deepcore-target
TargetSideIdentifier : 0100
AuthenticationType : NONE
InitiatorInstanceName : ROOT\\ISCSIPRT\\0000_0
InitiatorNodeAddress : iqn.1991-05.com.contoso:deepcore.contoso.com
InitiatorPortalAddress :
InitiatorSideIdentifier : 400001370002
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsMultipathEnabled : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : fffffa800d008430-4000013700000003
TargetNodeAddress : iqn.1991-05.com.contoso:testiscsi-deepcore-target
TargetSideIdentifier : 0300
The second command removes the session that has the specified session ID.
PS C:\\>Unregister-IscsiSession -SessionIdentifier "fffffa800d008430-4000013700000001"
This example gets a list of sessions, and then uses this cmdlet to remove the session.
RELATED LINKS
iSCSI on TechNet
Storage on TechNet
Get-IscsiSession