<?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: Get-Ncsnapmirror command fails sometimes in powershell in Data Protection</title>
    <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132679#M11494</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can specify the timeout parameter when connecting to the cluster:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SYNTAX
    Connect-NcController [-Name] &amp;lt;String[]&amp;gt; [-Port &amp;lt;UInt16&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-HTTPS] [-HTTP] [-Transient] [-Vserver &amp;lt;String&amp;gt;] [-Timeout &amp;lt;Int32&amp;gt;]
    [-Add] [-ApplicationName &amp;lt;String&amp;gt;] [-SSLVersion &amp;lt;String&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]

    -Timeout &amp;lt;Int32&amp;gt;
        Connection timeout in milliseconds.

        Required?                    false
        Position?                    named
        Default value                60000
        Accept pipeline input?       false
        Accept wildcard characters?  false&lt;/PRE&gt;&lt;P&gt;By default it will be 60 seconds (60000 milliseconds).&lt;/P&gt;&lt;P&gt;You can also modify the timeout by setting on the global controller object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$global:CurrentNcController.TimeoutMsec&lt;/PRE&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2017 00:31:19 GMT</pubDate>
    <dc:creator>mbeattie</dc:creator>
    <dc:date>2017-07-11T00:31:19Z</dc:date>
    <item>
      <title>Get-Ncsnapmirror command fails sometimes in powershell</title>
      <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132091#M11432</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When SMSQL tries to get the snapvault relationship by invoking the command get-Ncsnapmirror it fails sometimes.&lt;/P&gt;&lt;P&gt;but the thing is the same command executed &amp;nbsp;successfully the other day in production.So not sure why it fails sometimes...&lt;/P&gt;&lt;P&gt;Can anyone help me out..?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;General Critical Failed to run a command Get-NcSnapMirror.&lt;BR /&gt;Exception : Message : Command execution stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Object reference not set to an instance of an object.&lt;BR /&gt;Source : System.Management.Automation&lt;BR /&gt;StackTrace : at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)&lt;BR /&gt;at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()&lt;BR /&gt;at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are executing the command through &amp;gt;&amp;gt;pipeline.invoke(IEnumerable&amp;lt;&amp;gt;) method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Hemanth&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:56:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132091#M11432</guid>
      <dc:creator>HemanthC</dc:creator>
      <dc:date>2025-06-04T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Ncsnapmirror command fails sometimes in powershell</title>
      <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132094#M11433</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the error is reproduceable is there any more verbose information about the error using the following (if so can you post the output)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#'------------------------------------------------------------------------------
#'Invoke the powershell cmdlet.
#'------------------------------------------------------------------------------
Try{
   [String]$command = "&amp;lt;%insert_your_powershell_command_to_execute_here%&amp;gt; -ErrorAction Stop"
   Invoke-Expression -Command $command -ErrorAction Stop
   Write-Host "Executed Command`: $command"
}Catch{
   Write-Warning -Message $("Failed Executing Command`: $command. Error " + $_.Exception.Message) 
   echo $_.Exception | Format-List -Force
}
#'------------------------------------------------------------------------------ &lt;/PRE&gt;&lt;P&gt;Are you piping input into the cmdlet that is failing? Can you post the code snipet that generates the error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 05:59:17 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132094#M11433</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-06-21T05:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Ncsnapmirror command fails sometimes in powershell</title>
      <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132095#M11434</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately this error occured at the production environment so not able to give you more info&lt;/P&gt;&lt;P&gt;and also it is occuring sometimes.&lt;/P&gt;&lt;P&gt;Sometimes it is executed successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below code snippet where it is getting exception:&lt;/P&gt;&lt;P&gt;Command input is :Get-Ncsnapmirror&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;public Collection&amp;lt;PSObject&amp;gt; RunCommand(Command command, IEnumerable input = null)&lt;BR /&gt;&amp;gt;&amp;gt;{&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt;Collection&amp;lt;PSObject&amp;gt; output = null;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;try&lt;BR /&gt;&amp;gt;&amp;gt;{&lt;BR /&gt;&amp;gt;&amp;gt;if (command == null)&lt;BR /&gt;&amp;gt;&amp;gt;{&lt;BR /&gt;/* GLOBALYZER_EXTERNALIZED_TEXT:Input command object is null */&lt;BR /&gt;&amp;gt;&amp;gt;throw new ArgumentNullException(SDResources.PSHELPER_INPUTCOMMA_213);&lt;BR /&gt;&amp;gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;/&amp;gt;&amp;gt;/ Create new pipeline&lt;BR /&gt;&amp;gt;&amp;gt;Pipeline pipeline = NewPipeline(command);&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;// Invoke the pipeline (execute commands) and return the results to caller.&lt;BR /&gt;&amp;gt;&amp;gt;output = pipeline.Invoke(input); &amp;nbsp; &amp;nbsp; &amp;nbsp; *******//Exception occured here************&lt;BR /&gt;&amp;gt;&amp;gt;}&lt;BR /&gt;&amp;gt;&amp;gt;catch (Exception ex)&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;{&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;/* GLOBALYZER_EXTERNALIZED_TEXT:Failed to run a command {0} */&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;string formattedCommandString = string.Format(SDResources.PSHELPER_FAILEDTORU_216, command.ToString());&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;NsfLogger.LogCriticalError(formattedCommandString, ex);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;if (ex.Message.ToLower().Contains("specified vserver not found"))&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;{&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;string controllerName = command.Parameters.Where(p =&amp;gt; p.Name.Equals("Controller")).Select(p =&amp;gt; p.Value).First().ToString();&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;output = StorageConnectionFaultPublisher.OnConnectionFault(controllerName, command);&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;else&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;{&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;throw new PSHelperException(formattedCommandString, ex);&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 06:09:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132095#M11434</guid>
      <dc:creator>HemanthC</dc:creator>
      <dc:date>2017-06-21T06:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Ncsnapmirror command fails sometimes in powershell</title>
      <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132100#M11435</link>
      <description>&lt;P&gt;To get the snapmirror information is a SnapDrive task, so maybe there are some issue there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i would suggest to check if the Transport protocol settings are set up properly ( hostname with proper name resolution etc etc..) for both the source and destination SVMs&lt;/P&gt;&lt;P&gt;then check if the Nsf.config file you can find in the sanpdrive installation folder does contain all the the SVMs information.&lt;/P&gt;&lt;P&gt;Then you can try to reset the TPS setting in this way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Delete the SVMs details from TPS of SDW&lt;/P&gt;&lt;P&gt;- Add the SVMs to SDW in TPS.&lt;/P&gt;&lt;P&gt;- Click on "apply" and then click on "ok". [Do not click "ok" first].&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 09:55:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132100#M11435</guid>
      <dc:creator>matte</dc:creator>
      <dc:date>2017-06-21T09:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Ncsnapmirror command fails sometimes in powershell</title>
      <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132659#M11493</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a default timeout value of 60sec in SDW nextgen code. Then we use PSTK to get the status.&lt;/P&gt;&lt;P&gt;So whenever this timeout value is exceeded i.e., get-ncsnapmirror did not get a respoonse within 60sec from SVM,it is failing.&lt;/P&gt;&lt;P&gt;Any ideas on how to increase the timeout?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 17:08:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132659#M11493</guid>
      <dc:creator>HemanthC</dc:creator>
      <dc:date>2017-07-10T17:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Ncsnapmirror command fails sometimes in powershell</title>
      <link>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132679#M11494</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can specify the timeout parameter when connecting to the cluster:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SYNTAX
    Connect-NcController [-Name] &amp;lt;String[]&amp;gt; [-Port &amp;lt;UInt16&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-HTTPS] [-HTTP] [-Transient] [-Vserver &amp;lt;String&amp;gt;] [-Timeout &amp;lt;Int32&amp;gt;]
    [-Add] [-ApplicationName &amp;lt;String&amp;gt;] [-SSLVersion &amp;lt;String&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]

    -Timeout &amp;lt;Int32&amp;gt;
        Connection timeout in milliseconds.

        Required?                    false
        Position?                    named
        Default value                60000
        Accept pipeline input?       false
        Accept wildcard characters?  false&lt;/PRE&gt;&lt;P&gt;By default it will be 60 seconds (60000 milliseconds).&lt;/P&gt;&lt;P&gt;You can also modify the timeout by setting on the global controller object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$global:CurrentNcController.TimeoutMsec&lt;/PRE&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 00:31:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/Get-Ncsnapmirror-command-fails-sometimes-in-powershell/m-p/132679#M11494</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-07-11T00:31:19Z</dc:date>
    </item>
  </channel>
</rss>

