VMware Cloud Community
Middge
Contributor
Contributor
Jump to solution

Simple PowerCLI script despite Powerpath

Hello all.

In the vSphere fat client, if you look at a specific host's storage adapters, then click the "Paths" button you can see the following columns; "Runtime Name", "Target", "LUN", and "Status".

Most importantly, I am looking at the "Target" column. I am looking for a simple script that will list out all of these targets for each HBA on a specific host.

Unfortunately, we are using powerpath, and every single script I've found that would yield the information I need depends on the "Get-ScsiLun" function which does not work with powerpath.

I could of course manually get this information through the vsphere client, but considering I have over a thousand ESX hosts, this would be a pain. Any help would be hugely appreciated. Thank you.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Would this do the trick?

$esxcli = Get-EsxCli -VMHost MyEsx

$esxcli.storage.core.path.list()


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Would this do the trick?

$esxcli = Get-EsxCli -VMHost MyEsx

$esxcli.storage.core.path.list()


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

0 Kudos
Middge
Contributor
Contributor
Jump to solution

@LucD

This does yield what I want. I just need to do some post-parsing I think to clean it up. Thank you for your help.

0 Kudos