Identify WWN through Powershell

Run this command from Powershell

$nodewwntmp = Get-WmiObject -class MSFC_FCAdapterHBAAttributes -Namespace “root\wmi” |select NodeWWN

And then

$NodeWWN = (($nodewwntmp[1].NodeWWN) | ForEach-Object {“{0:x}” -f $_}) -join “:”

The variable $nodeWWN will have the WWN listed.

 

 

Comments

comments

Comment ( 1 )

  1. ReplyJayLB

    Try the below for correct formatting of WWNs and displaying it for each HBA. #Script starts $nodewwntmp = Get-WmiObject -class MSFC_FCAdapterHBAAttributes -Namespace “root\wmi” Foreach ($node in $nodewwntmp) { $NodeWWN = (($node.NodeWWN) | ForEach-Object {"{0:X2}" -f $_}) -join ":" $node.Model $node.ModelDescription $node.Active $nodeWWN } #Script ends You can also use the -comp switch to run it against remote servers. $nodewwntmp = Get-WmiObject -class MSFC_FCAdapterHBAAttributes -Namespace “root\wmi” -comp "servername"

Leave a reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>