Contributor
Contributor

Get HBA devices/paths list with Powercli

Jump to solution

Hi Guys,

I would like to know if is there a way to get the HBA devices list from a given vmHBA with PowerCli.

0 Kudos
25 Replies
Leadership
Leadership

Not to sure how you want to display that in a report?

Targets is on the HBA level, while Paths is normally on the Device level.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Enthusiast
Enthusiast

Apology for the delay reply. Exactly i am looking for Storage path pre-and post checks report (csv format) of ESX host & Storage activities on vCenter level.

ESX host Name,HBA Adapter,Type,Status,Device,LUN, LUN NAA ID,Targets,LUN Path State (Active or Standby).

Thanks in advance

Regards

Narayanan.

0 Kudos
Leadership
Leadership

That doesn't really answer my previous question.
Like I said earlier, I understand what you want to display, but how do you see the relation between LUN and path?

Btw, what do you already have and what is missing from your script?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Enthusiast
Enthusiast

Hi LuCD,

Got the expected output using the below script lines which clearly gives the path state (Active or standby) and the vmbha runtime information.

Get-VMHost -PipelineVariable esx | Get-ScsiLun -LunType disk -PipelineVariable lun | Get-ScsiLunPath |

Select @{N='ESX';E={$esx.Name}},

    @{N='LUN';E={$lun.CanonicalName}},

    LunPath,State | Export-Csv "C:\HBA1.csv" -NoTypeInformation -UseCulture

Thank you

Regards

Narayanan.

0 Kudos
Contributor
Contributor

How can modify this script for finding information about specific lun ids which I can input via a text file using getcontent.

 

The idea is to get path information for 100 luns for which I know naa IDs already.

0 Kudos
Leadership
Leadership

Cross-posting your question on multiple threads doesn't really help


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos