NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

how to get LUNID

TDUBB1234
9,009 Views

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

 

 

1 ACCEPTED SOLUTION

mark_schuren
8,996 Views

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

2 REPLIES 2

mark_schuren
8,997 Views

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

TDUBB1234
8,985 Views

Thank you. That works great

Public