PowerTip: Disconnect sessions to ISCSI target with PowerShell

Doctor Scripto

Summary: Learn how to disconnect sessions to a specified ISCSI target with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to disconnect sessions to a ISCSI target object?

Hey, Scripting Guy! Answer Use the Get-ISCSITarget cmdlet to retrieve the target, and then supply it as a node address for Disconnect-ISCSITarget, for example:

Get-IscsiTarget $Tar = Get-IscsiTarget Disconnect-IscsiTarget -NodeAddress $Tar.NodeAddress


Discussion is closed.

Feedback usabilla icon