Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Disconnect-NaHostIscsiTarget


NAME
Disconnect-NaHostIscsiTarget

SYNOPSIS
Disconnect the host from an iSCSI target.

SYNTAX
Disconnect-NaHostIscsiTarget [-SessionId <String>] [-TargetName] <String> [-
WhatIf] [-Confirm] [<CommonParameters>]


DESCRIPTION
Disconnect the host from an iSCSI target.


PARAMETERS
-SessionId <String>
The SessionId of the session to disconnect.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

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

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
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

<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



NOTES


Category: host

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

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


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





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

C:\PS>Get-NaHostIscsiTarget | where {$_.IsConnected} | Disconnect-NaHostIscs
iTarget


Disconnect all currently connected targets.






RELATED LINKS
Get-NaHostIscsiSession
Get-NaHostIscsiTarget
Connect-NaHostIscsiTarget







 Data ONTAP® PowerShell Toolkit