How-To: Retrieve World Wide Names (WWNs) and iSCSI Qualified Names (IQNs) on Windows Server
Below are examples of how to collect WWNs and IQNs using Windows PowerShell on Windows Server. If these methods result in an error, or for WWNs, do not retrieve the data required, please refer to your vendor's Host Bus Adapters (HBA) documentation for the latest methods to collect the information.
World Wide Names (WWNs)
Windows Server 2008 R2 and 2008 R2 (Service Pack 1)
Download the Fibre Channel Information (fcinfo) tool from Microsoft Download Center. Once installed open a Command Prompt or Windows PowerShell session and run the tool.
C:\>fcinfo There are 4 adapters: com.ciscosystems-Cisco VIC FCoE HBA-0: PortWWN: 20:00:00:25:b5:11:11:4c \\.\Scsi0: com.ciscosystems-Cisco VIC FCoE HBA-1: PortWWN: 20:00:00:25:b5:11:11:5c \\.\Scsi1: com.ciscosystems-Cisco VIC FCoE HBA-2: PortWWN: 20:00:00:25:b5:44:44:4c \\.\Scsi2: com.ciscosystems-Cisco VIC FCoE HBA-3: PortWWN: 20:00:00:25:b5:44:44:5c \\.\Scsi3:
When installing the fcinfo tool on Windows Server 2008 R2 (Service Pack 1) an error may be encountered regarding WMI interfaces. This can be ignored and the installation will complete successfully.
Windows Server 2012, 2012 R2, 2016 and 2019
PS C:\> Get-InitiatorPort InstanceName NodeAddress PortAddress ConnectionType ------------ ----------- ----------- -------------- PCI\VEN_1137&DEV_0045&SUBSYS_00841137&REV_A2\0025B5FFFF22003F00_0 20000025b544000e 20000025b522003f Fibre Channel PCI\VEN_1137&DEV_0045&SUBSYS_00841137&REV_A2\0025B5FFFF22000F00_0 20000025b544000e 20000025b522000f Fibre Channel PCI\VEN_1137&DEV_0045&SUBSYS_00841137&REV_A2\0025B5FFFF66003F00_0 20000025b544000e 20000025b566003f Fibre Channel PCI\VEN_1137&DEV_0045&SUBSYS_00841137&REV_A2\0025B5FFFF66000F00_0 20000025b544000e 20000025b566000f Fibre Channel
iSCSI Qualified Names (IQNs)
Windows Server 2008 R2 and 2008 R2 (Service Pack 1)
Windows Server 2008 R2 has a built in utility called iscsicli.exe. You can use this tool to show the IQNs.
C:\> iscsicli.exe ListTargets Microsoft iSCSI Initiator Version 6.0 Build 6000 Target List: iqn.2001-05.com.example:x-xxxxxx-xxxxxxxxx-xxxxxxxxxxx The operation completed successfully.
You can also use PowerShell to query the WMI Object Class.
PS C:\> (Get-WmiObject -Namespace root\wmi -Class MSiSCSIInitiator_MethodClass).iSCSINodeName iqn.1991-05.com.microsoft:myserver.local
Windows Server 2012, 2012 R2, 2016 and 2019
The Get-InitiatorPort
PowerShell cmdlet also lists and iSCSI IQNs as well as WWNs.
PS C:\> Get-InitiatorPort InstanceName NodeAddress PortAddress ConnectionType ------------ ----------- ----------- -------------- PCI\VEN_1077&DEV_2031&SUBSYS_02491077&REV_02\4&29b7c6e4&0&0018_0 2000000e1e1f6bc0 2100000e1e1f6bc0 Fibre Channel PCI\VEN_1077&DEV_2031&SUBSYS_02491077&REV_02\4&29b7c6e4&0&0118_0 2000000e1e1f6bc1 2100000e1e1f6bc1 Fibre Channel ROOT\ISCSIPRT\0000_0 iqn.1991-05.com.microsoft:sn1-r720-e04-07.ale.local ISCSI ANY PORT iSCSI