我是Powerhell的新手,尝试从脚本解码以下行:在PowerShell中的-f是什么意思?
Get-WmiObject -class MSFC_FCAdapterHBAAttributes -namespace“root \ WMI”|的foreach对象{(($ .NodeWWN)|的foreach对象{“{0:X}” -f $})}
脚本可在:https://gallery.technet.microsoft.com/scriptcenter/Find-HBA-and-WWPN-53121140
我更感兴趣的是“ForEach-Object {”{0:x}“-f $ _}”
“{0:x}”是什么意思?
那么-f对当前对象$ _做什么?
当我在Windows服务器上运行脚本时,发现其中一个NodeWWN条目: NodeWWN:{32,0,0,16 ...}现在转换为: 20:00:00: 10:9B:17:9E:28
如果这里的专家能够帮助我指出发生了什么,我们将非常感激。