Perfect. But only thing is that in output HBA name is not showing. Runtime Name is showing coming like below:
RuntimeName
-----------
0:T0:L8
0:T0:L8
0:T1:L8
0:T2:L8
Also if I want to collect it for multiple esx host and get the output in a csv file how the script would be.