VMware Cloud Community
jcw0009
Enthusiast
Enthusiast
Jump to solution

Retrieve vml id from naa id?

Is this possible using powercli, or do I have to ssh into the boxes to get this?

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try something like this

$esxName = "myEsx"

$esx = Get-VMHost $esxName

$esx.ExtensionData.Config.StorageDevice.ScsiLun |

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

    CanonicalName,

    @{N="VML";E={$_.Descriptor | where {$_.Id -match "^vml"} | Select -ExpandProperty Id}}


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

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

Try something like this

$esxName = "myEsx"

$esx = Get-VMHost $esxName

$esx.ExtensionData.Config.StorageDevice.ScsiLun |

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

    CanonicalName,

    @{N="VML";E={$_.Descriptor | where {$_.Id -match "^vml"} | Select -ExpandProperty Id}}


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

jcw0009
Enthusiast
Enthusiast
Jump to solution

That works. Thanks!

Reply
0 Kudos