我是 powershell 的新手,并试图从脚本中解码以下行
Get-WmiObject -class MSFC_FCAdapterHBAAttributes -namespace “root\WMI” | ForEach-Object {(($ .NodeWWN) | ForEach-Object {“{0:x}” -f $ })}
该脚本位于:https : //gallery.technet.microsoft.com/scriptcenter/Find-HBA-and-WWPN-53121140
我对“ForEach-Object {“{0:x}” -f $_} 更感兴趣
“{0:x}”是什么意思?
-f 对当前对象 $_ 有什么作用?
当我在 Windows Server 上运行脚本时,我看到 NodeWWN 条目之一: NodeWWN : {32, 0, 0, 16...} 现在转换为: 20:00:00:10:9B:17: 9E:28
如果这里的专家能帮助我指出正在发生的事情,我将不胜感激。
powershell ×1