<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object? in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164687#M6357</link>
    <description>&lt;P&gt;That's brilliant - thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've played around with the script to try and get a single table as opposed to individual tables per LUN path, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                                         
------- ------ -----------            ----------- -------------- ------------------ --------                                         
SAN          2 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE_VVOL_1/vvolPE-1614476525287
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can the script be tweaked to achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
    <pubDate>Sun, 07 Mar 2021 11:33:02 GMT</pubDate>
    <dc:creator>tyrone_owen_1</dc:creator>
    <dc:date>2021-03-07T11:33:02Z</dc:date>
    <item>
      <title>PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164648#M6354</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I want to combine the output from the following two cmdlets:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-NcLunMap | Select-Object Vserver,Path,InitiatorGroup,LunId
Get-NcIgroup | Select-Object InitiatorGroupAluaEnabled,InitiatorGroupOsType,InitiatorGroupType,Initiators&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been looking at the Don Jones video, &lt;A href="https://www.youtube.com/watch?v=TLUzPvA0HUo&amp;amp;t=42s" target="_blank"&gt;https://www.youtube.com/watch?v=TLUzPvA0HUo&amp;amp;t=42s&lt;/A&gt;, and I think I need to create a custom object. The cmdlets in the video return a single item, e.g. for a particular computer the Win32_OperatingSystem, however Get-NcLun/Igroup returns all of the LUNs/Igroups from a cluster.&amp;nbsp; I can see how the Don Jones example would work for a single item but I don't understand how to upscale that when there are multiple objects returned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also as an aside, is there any way I can get an online/offline status for initiators into my completed table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can probably tell, I'm a novice, any thoughts please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:32:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164648#M6354</guid>
      <dc:creator>tyrone_owen_1</dc:creator>
      <dc:date>2025-06-04T10:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164666#M6355</link>
      <description>&lt;P&gt;So after a bit more research I came across this approach, however it still doesn't get me what I want:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;function Get-CgiNcLunMapInfo ()
{
    
    $lunmapinfo = Get-NcLunMap
    $igroupinfo = Get-NcIgroup

    # Create custom object for $lunmapinfo
    # Empty array
    $lunmapinfoobjs = @()

    # Loop to set up a single custom object
    foreach ($lun in $lunmapinfo) {
    
        $props = @{ Vserver = $lun.Vserver
                    Path = $lun.Path
                    LunId = $lun.LunId
                    Igroup = $lun.InitiatorGroup
                    }
 
        $lunmapinfoobj = New-Object -TypeName PSObject -Property $props
 
        # Append to array
        $lunmapinfoobjs += $lunmapinfoobj
 
    }


    # Create custom object for $igroupinfo
    # Empty array
    $igroupinfoobjs = @()

    # Loop to set up a single custom object
    foreach ($igroup in $igroupinfo) {
    
        $props = @{ Igroup = $igroup.Name
                    Alua = $igroup.InitiatorGroupAluaEnabled
                    OsType = $igroup.InitiatorGroupOsType
                    GroupType = $igroup.InitiatorGroupType
                    Initiators = $igroup.Initiators 
                    }

        $igroupinfoobj = New-Object -TypeName PSObject -Property $props

        # Append to array
        $igroupinfoobjs += $igroupinfoobj

    }

    $props = @{ LunInfo = $lunmapinfoobjs
                IgroupInfo = $igroupinfoobjs
                }


    $obj = New-Object -TypeName PSObject -Property $props

    Write-Output $obj

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above script pushes the Get-NcLunMap objects/properties under the heading 'LunInfo' and the Get-NcIgroup objects/properties under the heading 'IgroupInfo', whereas I want to combine the properties into a single table, e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Path,LunId,Igroup,Vserver,Alua,Igroup,OsType,GroupType,Initiators&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 11:11:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164666#M6355</guid>
      <dc:creator>tyrone_owen_1</dc:creator>
      <dc:date>2021-03-05T11:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164680#M6356</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the attached document. It includes example code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OntapLuninfo.ps1

vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                              
------- ------ -----------            ----------- -------------- ------------------ --------                              
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE



Initiator                                        Online
---------                                        ------
iqn.1998-01.com.vmware:comp-01a-62411b9cdd7438fb True  
iqn.1998-01.com.vmware:comp-02a-92411b9cdd7438fb False 
iqn.1998-01.com.vmware:comp-03a-42411b9cdd7438fb False 
iqn.1998-01.com.vmware:comp-04a-52411b9cdd7438fb False 



vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                                         
------- ------ -----------            ----------- -------------- ------------------ --------                                         
SAN          2 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE_VVOL_1/vvolPE-1614476525287



Initiator                                        Online
---------                                        ------
iqn.1998-01.com.vmware:comp-01a-62411b9cdd7438fb True  
iqn.1998-01.com.vmware:comp-02a-92411b9cdd7438fb False 
iqn.1998-01.com.vmware:comp-03a-42411b9cdd7438fb False 
iqn.1998-01.com.vmware:comp-04a-52411b9cdd7438fb False 
&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 06 Mar 2021 05:54:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164680#M6356</guid>
      <dc:creator>jcolonfzenpr</dc:creator>
      <dc:date>2021-03-06T05:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164687#M6357</link>
      <description>&lt;P&gt;That's brilliant - thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've played around with the script to try and get a single table as opposed to individual tables per LUN path, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                                         
------- ------ -----------            ----------- -------------- ------------------ --------                                         
SAN          2 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE_VVOL_1/vvolPE-1614476525287
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can the script be tweaked to achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 11:33:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164687#M6357</guid>
      <dc:creator>tyrone_owen_1</dc:creator>
      <dc:date>2021-03-07T11:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164691#M6358</link>
      <description>&lt;P&gt;only need to change one line of the code. put a # in front of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;Write-Output $initiatoronline&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 07 Mar 2021 18:18:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164691#M6358</guid>
      <dc:creator>jcolonfzenpr</dc:creator>
      <dc:date>2021-03-07T18:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Combine the output of Get-NcLunMap and Get-NcIgroup - custom object?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164697#M6359</link>
      <description>&lt;P&gt;Thank again for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that, but the output looks like this instead of consolidated under one heading:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                                         
------- ------ -----------            ----------- -------------- ------------------ --------                                         
SAN          2 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE_VVOL_1/vvolPE-1614476525287

vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                                         
------- ------ -----------            ----------- -------------- ------------------ -------- 
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE
vServer Lun ID IGROUP Name            IGROUP TYPE IGROUP TYPE OS IGROUP ALUA ENABLE Lun Path                                         
------- ------ -----------            ----------- -------------- ------------------ -------- 
SAN          0 comp-01a               mixed       vmware                       True /vol/SERVER_DATASTORE/SERVER_DATASTORE2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 08:35:33 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PSTK-Combine-the-output-of-Get-NcLunMap-and-Get-NcIgroup-custom-object/m-p/164697#M6359</guid>
      <dc:creator>tyrone_owen_1</dc:creator>
      <dc:date>2021-03-08T08:35:33Z</dc:date>
    </item>
  </channel>
</rss>

