February 28th, 2016

PowerTip: Disconnect sessions to ISCSI target with PowerShell

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.