<?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: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode) in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131899#M2387</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/32693"&gt;@FelipeMafra&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you plase help me with the below as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-LUNInfo.ps1 -Filer pr-netapp-01 |Export-Csv -Path pr-netapp-01.csv -NoTypeInformation -Delimiter ";"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I run the above at powershell it gives the below error. I might be running it wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-LUNInfo.ps1 : The term 'Get-LUNInfo.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path&lt;BR /&gt;was included, verify that the path is correct and try again.&lt;BR /&gt;At line:1 char:1&lt;BR /&gt;+ Get-LUNInfo.ps1 -Filer pr-netapp-01 |Export-Csv -Path pr-netapp-01.csv -NoTypeIn ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : ObjectNotFound: (Get-LUNInfo.ps1:String) [], CommandNotFoundException&lt;BR /&gt;+ FullyQualifiedErrorId : CommandNotFoundException&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2017 18:09:32 GMT</pubDate>
    <dc:creator>Pramod_Kumar</dc:creator>
    <dc:date>2017-06-14T18:09:32Z</dc:date>
    <item>
      <title>Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/121911#M2042</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In cases where you need to know to which Igroup a LUN is mapped to (7-Mode script):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Param(
    [Parameter(Mandatory=$true)]
    [string]$Filer
)

function Get-LUNData($LUN){
    $LunPath = $LUN.Path
    $LunSize=$LUN.Size # Size in bytes

    Get-NaLunMap -Path $LunPath -Controller $Connection|ForEach-Object{
        $output = New-Object psobject
        $Map=$_

        $output |Add-Member NoteProperty "LUN Path" $LunPath
        $output |Add-Member NoteProperty "Size (GB)" ("{0:N0}" -f ($LunSize / 1GB))
        $output |Add-Member NoteProperty "Mapped to" $Map.Name

        Write-Output $output
            
    }
}

if(-not $Credential) {
    $Credential = Get-Credential
}

$Connection = Connect-NaController $Filer -HTTPS -Credential $Credential -Transient

if(-not $Connection){
    Exit -1
}

Get-NaLun -Controller $Connection|ForEach-Object{
    Get-LUNData -LUN $_
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can even export it to CSV file easily:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Get-LUNInfo.ps1 -Filer [filer name] |Export-Csv -Path MyCSVFile.csv -NoTypeInformation -Delimiter ";"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe someone needs it.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 18:05:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/121911#M2042</guid>
      <dc:creator>FelipeMafra</dc:creator>
      <dc:date>2017-06-14T18:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/121939#M2044</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/32693"&gt;@FelipeMafra﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great work, and thank you for helping the community. &amp;nbsp;If you're willing to send me your address (in a private message please) I'd be happy to mail you some NetApp stickers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For clustered Data ONTAP users, you can get similar information using this bit of script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Get-NcLun | Select Path,`
    @{N='Size';E={ $_.Size | ConvertTo-FormattedNumber }},`
    @{N='SizeUsed';E={ $_.SizeUsed | ConvertTo-FormattedNumber }},`
    Online,`
    Mapped,`
    @{N='igroup';E={ (Get-NcLunMap -Path $_.Path).InitiatorGroup }} | Format-Table -AutoSize&lt;/PRE&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 13:46:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/121939#M2044</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2016-08-02T13:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131890#M2383</link>
      <description>&lt;P&gt;Thanks for the Script, &amp;nbsp; Can you help me resolve the below error that PS is throwing back to back when I run this script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-LUNInfo : The term 'Get-LUNInfo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was&lt;BR /&gt;included, verify that the path is correct and try again.&lt;BR /&gt;At D:\Automation\Lun_Info.ps1:34 char:5&lt;BR /&gt;+ Get-LUNInfo -LUN $_&lt;BR /&gt;+ ~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : ObjectNotFound: (Get-LUNInfo:String) [], CommandNotFoundException&lt;BR /&gt;+ FullyQualifiedErrorId : CommandNotFoundException&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 16:29:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131890#M2383</guid>
      <dc:creator>Pramod_Kumar</dc:creator>
      <dc:date>2017-06-14T16:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131892#M2384</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/60506"&gt;@Pramod_Kumar&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears to be a bug/typo in the script. &amp;nbsp;The line should be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Get-LUNData -LUN $_&lt;/PRE&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 17:17:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131892#M2384</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2017-06-14T17:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131897#M2385</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/8479"&gt;@asulliva&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It working as expected now.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 17:57:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131897#M2385</guid>
      <dc:creator>Pramod_Kumar</dc:creator>
      <dc:date>2017-06-14T17:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131898#M2386</link>
      <description>&lt;P&gt;Exactly,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I misspelled&amp;nbsp;since my script name is&amp;nbsp;Get-LUNInfo. I've just fixed original post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 18:06:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131898#M2386</guid>
      <dc:creator>FelipeMafra</dc:creator>
      <dc:date>2017-06-14T18:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131899#M2387</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/32693"&gt;@FelipeMafra&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you plase help me with the below as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-LUNInfo.ps1 -Filer pr-netapp-01 |Export-Csv -Path pr-netapp-01.csv -NoTypeInformation -Delimiter ";"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I run the above at powershell it gives the below error. I might be running it wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-LUNInfo.ps1 : The term 'Get-LUNInfo.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path&lt;BR /&gt;was included, verify that the path is correct and try again.&lt;BR /&gt;At line:1 char:1&lt;BR /&gt;+ Get-LUNInfo.ps1 -Filer pr-netapp-01 |Export-Csv -Path pr-netapp-01.csv -NoTypeIn ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : ObjectNotFound: (Get-LUNInfo.ps1:String) [], CommandNotFoundException&lt;BR /&gt;+ FullyQualifiedErrorId : CommandNotFoundException&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 18:09:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131899#M2387</guid>
      <dc:creator>Pramod_Kumar</dc:creator>
      <dc:date>2017-06-14T18:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script to show LUN Name, LUN Size and Mapped Igroup (7-Mode)</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131904#M2388</link>
      <description>&lt;P&gt;Save the first source code using this name:&amp;nbsp;&lt;SPAN&gt;Get-LUNInfo.ps1 then you'll be able to use it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 20:05:06 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Powershell-script-to-show-LUN-Name-LUN-Size-and-Mapped-Igroup-7-Mode/m-p/131904#M2388</guid>
      <dc:creator>FelipeMafra</dc:creator>
      <dc:date>2017-06-14T20:05:06Z</dc:date>
    </item>
  </channel>
</rss>

