Automation

 View Only
  • 1.  Simple PowerCLI script despite Powerpath

    Posted Feb 12, 2018 05:01 PM

    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.



  • 2.  RE: Simple PowerCLI script despite Powerpath
    Best Answer

    Posted Feb 12, 2018 05:13 PM

    Would this do the trick?

    $esxcli = Get-EsxCli -VMHost MyEsx

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



  • 3.  RE: Simple PowerCLI script despite Powerpath

    Posted Feb 12, 2018 05:33 PM

    @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.