Microsoft Virtualization Discussions

how to get LUNID

how can I get the lun ID of each lun that is mapped to each initiator group I created with the powershell toolkit? It will be similar to the 


lun show -m command


but in powershell




Re: how to get LUNID

Try to start with something like this (for 7-mode):


Get-NaLun | ? {$_.Mapped -eq $true} | % {Get-NaLunMap -path $_.Path} | ft Path,InitiatorGroupType,ALUA,InitiatorGroupName,LunId


Also have a look at "Get-Member", to see all properties of "NaLunMap" objects:


Get-NaLun | ? {$_.Mapped -eq $true} | % {Get-NaLunMap -path $_.Path} | gm



For C-Mode something like this might be sufficient:


Get-NcLunMap | ft Vserver,Path,InitiatorGroup,LunId

View solution in original post


Re: how to get LUNID

Thank you. That works great

Check out the KB!
NetApp Insights To Action
All Community Forums