Appendix M Script for Reporting Information Registered
If large volume of information on initiators and targets is registered with iSNS Server, information
displayed by the isnscli ListAllNodesWithDetails command becomes large and makes
identifying initiator names difficult. You can use a vbs script to quickly perform identification and to
report only information required to identify initiator names.
Script name: isns.vbs
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
Set colItems = objWMIService.ExecQuery( "SELECT * FROM
MSiSNSServerProvider_NodeClass",,48)
For Each objItem in colItems
If objItem.iSCSINodeType = 2 Then
Wscript.Echo "iSCSIName=" + objItem.iSCSIName
If objItem.iSCSINodeAlias <> "" Then
Else
End If
End If
Next
Following is the sample output displayed when isns.vbs script is run.
C:\>cscript //Nologo isns.vbs
iSCSIName=iqn.1991-05.com.microsoft:server1
iSCSINodeAlias=<MS SW iSCSI Initiator>
iSCSIName=iqn.1994-05.com.redhat:41139fb1987e
iSCSINodeAlias=server2
Release 6.0
with iSNS Server
Wscript.Echo "iSCSINodeAlias=" + objItem.iSCSINodeAlias
Wscript.Echo "iSCSINodeAlias="
439
Initiator name of
the server2.