Skip to main content
Pure1 Support Portal

Retrieve World Wide Names (WWNs) on Windows Server

Below are examples of how to collect WWNs using Windows PowerShell on Windows Server. If these methods result in an error or do not retrieve the Node World Wide Name (NodeWWN) as shown please refer to your vendor Host Bus Adapters (HBA) documentation for the latest ways to collect the information.

 

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 and 2016

$Namespace = "root\WMI"
$port = Get-WmiObject -Class MSFC_FibrePortHBAAttributes -Namespace $Namespace @PSBoundParameters
$hbas = Get-WmiObject -Class MSFC_FCAdapterHBAAttributes -Namespace $Namespace @PSBoundParameters
$hbaProp = $hbas | Get-Member -MemberType Property, AliasProperty | Select -ExpandProperty name | ? {$_ -notlike "__*"}
$hbas = $hbas | Select $hbaProp
$hbas | %{ $_.NodeWWN = ((($_.NodeWWN) | % {"{0:x2}" -f $_}) -join ":").ToUpper() }
 
ForEach($hba in $hbas) {
    Add-Member -MemberType NoteProperty -InputObject $hba -Name FabricName -Value (
    ($port |? { $_.instancename -eq $hba.instancename}).attributes | `
    Select `
    @{Name='Port WWN';Expression={(($_.PortWWN | % {"{0:x2}" -f $_}) -join ":").ToUpper()}}
    ) -passThru | Select FabricName
} 

FabricName                         
----------                         
@{Port WWN=20:00:00:25:B5:22:00:3F}
@{Port WWN=20:00:00:25:B5:22:00:0F}
@{Port WWN=20:00:00:25:B5:66:00:3F}
@{Port WWN=20:00:00:25:B5:66:00:0F}