vrm
Contributor
Contributor

How To Powercli Get the actual number of paths in Datastore Details

Jump to solution

I'm searching for a Powercli command to get the actual number of paths in Datastore > Datastore Details

Cheers,

Vincent

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

You can do something like this

$esxName = 'MyEsx'

$esx = Get-VMHost -Name $esxName

$esxcli = Get-EsxCli -VMHost $esx

$esxcli.storage.vmfs.extent.list() |

Select VolumeName,ExtentNumber,@{N='Device';E={$_.DeviceName}},

    @{N='Path#';E={

        $esxcli.storage.core.path.list($_.DeviceName) | Measure-Object | Select -ExpandProperty Count

    }}


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership

You can do something like this

$esxName = 'MyEsx'

$esx = Get-VMHost -Name $esxName

$esxcli = Get-EsxCli -VMHost $esx

$esxcli.storage.vmfs.extent.list() |

Select VolumeName,ExtentNumber,@{N='Device';E={$_.DeviceName}},

    @{N='Path#';E={

        $esxcli.storage.core.path.list($_.DeviceName) | Measure-Object | Select -ExpandProperty Count

    }}


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

0 Kudos
vrm
Contributor
Contributor

Many thanks Luc!

Cheers!

0 Kudos