<?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: Invoke-NaSsh : Auth fail in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-Auth-fail/m-p/21647#M1007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Tim.&amp;nbsp; The simplest way is probably to test the credentials using Connect-NaController:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;Connect-NaController 10.61.167.60 -Credential root -ErrorAction Stop -Transient&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an error occurs, the script will abort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want more control over the error handling, something like this might work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;$c = Connect-NaController 10.61.167.60 -Credential root -ErrorAction SilentlyContinue -Transient&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;if ($c -EQ $null) { Write-Host "Connection failed." }&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2011 15:30:26 GMT</pubDate>
    <dc:creator>cknight</dc:creator>
    <dc:date>2011-05-12T15:30:26Z</dc:date>
    <item>
      <title>Invoke-NaSsh : Auth fail</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-Auth-fail/m-p/21642#M1006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I write a script that covers typos in authentication?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$SrcFilerName="nas01"&lt;/P&gt;&lt;P&gt;$DstFilerName="nas02"&lt;/P&gt;&lt;P&gt;Add-NaCredential $SrcFilerName&lt;/P&gt;&lt;P&gt;Add-NaCredential $DstFilerName&lt;/P&gt;&lt;P&gt;Invoke-NaSsh -name $SrcFilerName "hostname"&lt;/P&gt;&lt;P&gt;Invoke-NaSsh -name $DstFilerName "hostname"&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I exit the script if a typo is made in either of authentication processes? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If incorrect credentials are supplied the above invoke-nassh cmds errors with:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoke-NaSsh : Auth fail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:55:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-Auth-fail/m-p/21642#M1006</guid>
      <dc:creator>TIM_RUFUS</dc:creator>
      <dc:date>2025-06-05T06:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NaSsh : Auth fail</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-Auth-fail/m-p/21647#M1007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Tim.&amp;nbsp; The simplest way is probably to test the credentials using Connect-NaController:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;Connect-NaController 10.61.167.60 -Credential root -ErrorAction Stop -Transient&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an error occurs, the script will abort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want more control over the error handling, something like this might work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;$c = Connect-NaController 10.61.167.60 -Credential root -ErrorAction SilentlyContinue -Transient&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;if ($c -EQ $null) { Write-Host "Connection failed." }&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 15:30:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-Auth-fail/m-p/21647#M1007</guid>
      <dc:creator>cknight</dc:creator>
      <dc:date>2011-05-12T15:30:26Z</dc:date>
    </item>
  </channel>
</rss>

