Use the vSphere CLI to remove an iSCSI session between an iSCSI adapter and a target.

To remove a session, use esxcli swiscsi session remove. The command takes these options.

d -- The name of your iSCSI adapter, such as vmhbaXX.

t -- The name of the target to log in, such as iqnXX.

s -- The ISID of a session to duplicate, such as session_isid. You can find it by listing all session.

# esxcli swiscsi session remove -t -s '00:02:3d:01:00:01'

Rescan the iSCSI adapter.