<?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 Toolkit 4.6 &amp;amp; Invoke-NaSsh in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140992#M5813</link>
    <description>&lt;P&gt;Hi Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you please show me how I can get &lt;STRONG&gt;vif-name and containing online links&lt;/STRONG&gt; via Invoke-NaSystemApi ? I'm not able to get this informations...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2018 09:12:28 GMT</pubDate>
    <dc:creator>LUKASPRELOVSKY</dc:creator>
    <dc:date>2018-06-19T09:12:28Z</dc:date>
    <item>
      <title>Powershell Toolkit 4.6 &amp; Invoke-NaSsh</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140862#M5802</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running a powershell script to collect some ifgrp informations from my 7-mode filers (powershell via putty).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; $IfGrpStatus = Invoke-NaSsh "ifgrp status $($ifgrp)"&lt;/PRE&gt;
&lt;P&gt;How I can close current sessions, which were opened by my script?&lt;BR /&gt;The Problem is, after I start my script I can't login to my filer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/sbin/ngsh: Too many users&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Connection to XXXXXX closed.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everytime I have to disconned all sessions with &lt;STRONG&gt;ssh FILER logout telnet&lt;/STRONG&gt; command and that's not comfortable for my usage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you and regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:37:16 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140862#M5802</guid>
      <dc:creator>LUKASPRELOVSKY</dc:creator>
      <dc:date>2025-06-04T13:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell Toolkit 4.6 &amp; Invoke-NaSsh</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140951#M5811</link>
      <description>&lt;P&gt;Hi Lucas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try to use "Invoke-NaSystemApi" instead of "Invoke-NaSsh". I've posted some powershell examples here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2" href="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2" target="_blank"&gt;https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 03:19:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140951#M5811</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-06-18T03:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell Toolkit 4.6 &amp; Invoke-NaSsh</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140992#M5813</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you please show me how I can get &lt;STRONG&gt;vif-name and containing online links&lt;/STRONG&gt; via Invoke-NaSystemApi ? I'm not able to get this informations...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:12:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/140992#M5813</guid>
      <dc:creator>LUKASPRELOVSKY</dc:creator>
      <dc:date>2018-06-19T09:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell Toolkit 4.6 &amp; Invoke-NaSsh</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/141048#M5818</link>
      <description>&lt;P&gt;Hi Lukas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an "example" for you to modify to meet the requirements of your environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source Code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;#'-----------------------------------------------------------------------------
'Script Name : GetIfGrp.ps1
'Author      : Matthew Beattie
'Created     : 2018-06-21
'Description : This script connects to a 7-Mode controller and enumerates ifgrps.
'-------------------------------------------------------------------------------
'Functions Section
'-----------------------------------------------------------------------------#&amp;gt;
Param(
   [Parameter(Mandatory=$True, HelpMessage="The 7-Mode controller name or IP Address")]   
   [String]$Controller,
   [Parameter(Mandatory=$False, HelpMessage="The credentials to connect to the controller")]   
   [System.Management.Automation.PSCredential]$Credentials
)
#'------------------------------------------------------------------------------
#'Import the DataONTAP powershell module
#'------------------------------------------------------------------------------
Import-Module DataONTAP
#'------------------------------------------------------------------------------
#'Prompt for credentials if not provided.
#'------------------------------------------------------------------------------
If(-Not($Credentials)){
   $Credentials = Get-Credential
}
#'------------------------------------------------------------------------------
#'Connect to the Controller
#'------------------------------------------------------------------------------
Try{
   Connect-NaController -Name $Controller -Credential $Credentials -ErrorAction Stop | Out-Null
   Write-Host "Connected to ""$Controller"""
}Catch{
   Write-Warning -Message $("Failed connecting to ""$Controller"". Error " + $_.Exception.Message)
   Break;
}
#'------------------------------------------------------------------------------
#'Enumerate the Interface groups.
#'------------------------------------------------------------------------------
[Array]$command = @("ifgrp", "status")
 Try{
   $api = $("&amp;lt;system-cli&amp;gt;&amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;" + ($command -join "&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;") + "&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;&amp;lt;/system-cli&amp;gt;")
   $output = Invoke-NaSystemApi -Request $api -ErrorAction Stop
   Write-Host $("Executed Command`: " + $([String]::Join(" ", $command)))
}Catch{
   Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command)) + ". Error " + $_.Exception.Message)
   Break;
}
#'------------------------------------------------------------------------------
#'Format the command output if the command result was sucessfull.
#'------------------------------------------------------------------------------
If($output.results."cli-result-value" -eq 1){
   [Array]$lines = $output.results."cli-output".Trim().Split("`n")
   ForEach($line In $lines){
      [String]$result   = $($line -Replace("\s+", " ")).Trim();
      [Array]$elements += $result
   }
   ForEach($element In $elements){
      Write-Host $element
   }
}
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PS C:\Scripts\PowerShell\Projects\GetIfGrp&amp;gt; .\GetIfGrp.ps1 -Controller testns01 -Credentials $Credentials
Connected to "testns01"
Executed Command: ifgrp status
default: transmit 'IP Load balancing', Ifgrp Type 'multi_mode', fail 'log'
ifgrp1: 2 links, transmit 'IP Load balancing', Ifgrp Type 'multi_mode' fail 'default'
Ifgrp Status Up Addr_set
up:
e0d: state up, since 21Jun2018 11:56:37 (00:37:38)
mediatype: auto-1000t-fd-up
flags: enabled
input packets 1, input bytes 64
output packets 0, output bytes 0
up indications 1, broken indications 0
drops (if) 0, drops (link) 0
indication: up at 21Jun2018 11:56:37
consecutive 2118, transitions 1
e0c: state up, since 21Jun2018 11:56:31 (00:37:44)
mediatype: auto-1000t-fd-up
flags: enabled
input packets 1, input bytes 64
output packets 0, output bytes 0
up indications 1, broken indications 0
drops (if) 0, drops (link) 0
indication: up at 21Jun2018 11:56:31
consecutive 2124, transitions 1&lt;/PRE&gt;
&lt;P&gt;Hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 02:42:27 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Toolkit-4-6-amp-Invoke-NaSsh/m-p/141048#M5818</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-06-21T02:42:27Z</dc:date>
    </item>
  </channel>
</rss>

