Reply to Message

View discussion in a popup

Replying to:
vin01
Expert
Expert

Script to convert HBA WWNs to lowercase and add ":"


Hi

Is it possible to convert the output of below script wwn details to lower case and : after every two characters.

like below 10:00:00:00:c9:ab:cd:ef

script used :

Get-Datacenter "test" | Get-Cluster "testcluster" | Get-VMhost | Get-VMHostHBA -Type FibreChannel | where {$_.Status -eq "online"} | Select @{N="Datacenter";E={$datacenter}},@{N="Cluster";E={$cluster}},VMHost,Device,Status,@{N="WWN";E={"{0:X}"-f$_.PortWorldWideName}} | Export-Csv C:\output.csv

Regards Vineeth.K
Reply
0 Kudos