Hello, I am trying to make this script that will generate the WWPNs from multiple servers, but for some reason it is only generating the WWPN of the machine but not the hostnames, how do I make it generate the hostname of each WWPN that it lists?
$computers=Get-ContentC:\scripts\servers.txt
Get-WmiObject
-computername$computers-classMSFC_FibrePortHBAAttributes-namespace"root\WMI"|Select-ExpandpropertyAttributes|%{ ($_.PortWWN|%{"{0:x2}"-f$_})-join":"}