<?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 PowerShell Toolkit 9.12.1 - Issue with Invoke-NcSnapMirrorUpdate (wrong snapmirror updated) in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/PowerShell-Toolkit-9-12-1-Issue-with-Invoke-NcSnapMirrorUpdate-wrong-snapmirror/m-p/443534#M496</link>
    <description>&lt;P&gt;I have a PowerShell script that worked with the PSTK version 9.8 but I am unable to get working with 9.12.1.&amp;nbsp; It appears that I am unable to properly call the Invoke-NcSnapMirror* commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the code, I retrieve a list of all snapmirrors on two FAS systems and present the user with a grid to select one to work on.&lt;/P&gt;&lt;P&gt;After selection, I validate the snapmirror select and I am able to call Get-NcSnapMirror using the retrieved selection data to see the status of the snapmirror.&lt;/P&gt;&lt;P&gt;But when I use the same variables to perform any Invoke-NcSnapmirror command, it works on the wrong snapmirror.&lt;/P&gt;&lt;P&gt;I added -ONTAPI to the command and it works correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the relevant code that does not work:&lt;/P&gt;&lt;P&gt;Wr G "3) Get SnapMirror List and select replications to reverse..."; ""&lt;/P&gt;&lt;P&gt;$SML = Get-NcSnapMirror -Controller $apfas -ErrorAction stop| select SourceVserver, DestinationVserver, Status, IsHealthy, TransferSchedule, SourceLocation, DestinationLocation, MirrorState, NcController, Policy, PolicyType, Vserver | sort SourceLocation&lt;BR /&gt;$SML += Get-NcSnapMirror -Controller $fpfas -ErrorAction stop| select SourceVserver, DestinationVserver, Status, IsHealthy, TransferSchedule, SourceLocation, DestinationLocation, MirrorState, NcController, Policy, PolicyType, Vserver | sort SourceLocation&lt;/P&gt;&lt;P&gt;$GridArguments = @{&lt;BR /&gt;OutputMode = 'Single'&lt;BR /&gt;Title = 'Please select a SnapMirror replication to revserse and click OK'&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$SnapMirror = $SML | Out-GridView @GridArguments&lt;BR /&gt;if ( $SnapMirror -ne $null ) {&lt;/P&gt;&lt;P&gt;Wr G "SnapMirror Selected:"&lt;BR /&gt;$SnapMirror | Format-List&lt;/P&gt;&lt;P&gt;if ( $SnapMirror.NcController.Name -eq $fpfas.Name) {&lt;BR /&gt;$DstCtrl = $fpfas&lt;BR /&gt;$SrcCtrl = $apfas&lt;BR /&gt;} else {&lt;BR /&gt;$DstCtrl = $apfas&lt;BR /&gt;$SrcCtrl = $fpfas&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$DstLoc = $SnapMirror.DestinationLocation&lt;BR /&gt;if ( $DstLoc -eq $null ) { Write-Error 'Destination Location Not Found' -ErrorAction Stop}&lt;BR /&gt;$Schedule = $SnapMirror.TransferSchedule&lt;BR /&gt;#$DstSVM, $DstVol = $DstLoc -Split ":"&lt;/P&gt;&lt;P&gt;$SrcLoc = $SnapMirror.SourceLocation&lt;BR /&gt;if ( $SrcLoc -eq $null ) { Write-Error 'Source Location Not Found' -ErrorAction Stop}&lt;BR /&gt;#$SrcSVM, $SrcVol = $SrcLoc -split ":"&lt;/P&gt;&lt;P&gt;Wr G "";Wr G "Get Status of SnapMirror Selected:"&lt;BR /&gt;Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc | Format-List -Property *&lt;/P&gt;&lt;P&gt;Invoke-NcSnapMirrorUpdate -Controller $DstCtrl -Destination $DstLoc -Source $SrcLoc -ErrorAction stop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make the code work, I simply change the last command by adding "-ONTAPI" to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong with RESTAPI?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 09:50:23 GMT</pubDate>
    <dc:creator>MRoney</dc:creator>
    <dc:date>2025-06-04T09:50:23Z</dc:date>
    <item>
      <title>PowerShell Toolkit 9.12.1 - Issue with Invoke-NcSnapMirrorUpdate (wrong snapmirror updated)</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/PowerShell-Toolkit-9-12-1-Issue-with-Invoke-NcSnapMirrorUpdate-wrong-snapmirror/m-p/443534#M496</link>
      <description>&lt;P&gt;I have a PowerShell script that worked with the PSTK version 9.8 but I am unable to get working with 9.12.1.&amp;nbsp; It appears that I am unable to properly call the Invoke-NcSnapMirror* commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the code, I retrieve a list of all snapmirrors on two FAS systems and present the user with a grid to select one to work on.&lt;/P&gt;&lt;P&gt;After selection, I validate the snapmirror select and I am able to call Get-NcSnapMirror using the retrieved selection data to see the status of the snapmirror.&lt;/P&gt;&lt;P&gt;But when I use the same variables to perform any Invoke-NcSnapmirror command, it works on the wrong snapmirror.&lt;/P&gt;&lt;P&gt;I added -ONTAPI to the command and it works correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the relevant code that does not work:&lt;/P&gt;&lt;P&gt;Wr G "3) Get SnapMirror List and select replications to reverse..."; ""&lt;/P&gt;&lt;P&gt;$SML = Get-NcSnapMirror -Controller $apfas -ErrorAction stop| select SourceVserver, DestinationVserver, Status, IsHealthy, TransferSchedule, SourceLocation, DestinationLocation, MirrorState, NcController, Policy, PolicyType, Vserver | sort SourceLocation&lt;BR /&gt;$SML += Get-NcSnapMirror -Controller $fpfas -ErrorAction stop| select SourceVserver, DestinationVserver, Status, IsHealthy, TransferSchedule, SourceLocation, DestinationLocation, MirrorState, NcController, Policy, PolicyType, Vserver | sort SourceLocation&lt;/P&gt;&lt;P&gt;$GridArguments = @{&lt;BR /&gt;OutputMode = 'Single'&lt;BR /&gt;Title = 'Please select a SnapMirror replication to revserse and click OK'&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$SnapMirror = $SML | Out-GridView @GridArguments&lt;BR /&gt;if ( $SnapMirror -ne $null ) {&lt;/P&gt;&lt;P&gt;Wr G "SnapMirror Selected:"&lt;BR /&gt;$SnapMirror | Format-List&lt;/P&gt;&lt;P&gt;if ( $SnapMirror.NcController.Name -eq $fpfas.Name) {&lt;BR /&gt;$DstCtrl = $fpfas&lt;BR /&gt;$SrcCtrl = $apfas&lt;BR /&gt;} else {&lt;BR /&gt;$DstCtrl = $apfas&lt;BR /&gt;$SrcCtrl = $fpfas&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$DstLoc = $SnapMirror.DestinationLocation&lt;BR /&gt;if ( $DstLoc -eq $null ) { Write-Error 'Destination Location Not Found' -ErrorAction Stop}&lt;BR /&gt;$Schedule = $SnapMirror.TransferSchedule&lt;BR /&gt;#$DstSVM, $DstVol = $DstLoc -Split ":"&lt;/P&gt;&lt;P&gt;$SrcLoc = $SnapMirror.SourceLocation&lt;BR /&gt;if ( $SrcLoc -eq $null ) { Write-Error 'Source Location Not Found' -ErrorAction Stop}&lt;BR /&gt;#$SrcSVM, $SrcVol = $SrcLoc -split ":"&lt;/P&gt;&lt;P&gt;Wr G "";Wr G "Get Status of SnapMirror Selected:"&lt;BR /&gt;Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc | Format-List -Property *&lt;/P&gt;&lt;P&gt;Invoke-NcSnapMirrorUpdate -Controller $DstCtrl -Destination $DstLoc -Source $SrcLoc -ErrorAction stop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make the code work, I simply change the last command by adding "-ONTAPI" to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong with RESTAPI?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:50:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/PowerShell-Toolkit-9-12-1-Issue-with-Invoke-NcSnapMirrorUpdate-wrong-snapmirror/m-p/443534#M496</guid>
      <dc:creator>MRoney</dc:creator>
      <dc:date>2025-06-04T09:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Toolkit 9.12.1 - Issue with Invoke-NcSnapMirrorUpdate (wrong snapmirror updated)</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/PowerShell-Toolkit-9-12-1-Issue-with-Invoke-NcSnapMirrorUpdate-wrong-snapmirror/m-p/443946#M500</link>
      <description>&lt;P&gt;Hello MRoney,&lt;/P&gt;&lt;P&gt;Thank you for bringing this issue to our attention. We have been able to replicate it on our end and we assure you that we will be addressing it promptly. Rest assured that we will have it fixed in the upcoming release version 9.13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 11:55:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/PowerShell-Toolkit-9-12-1-Issue-with-Invoke-NcSnapMirrorUpdate-wrong-snapmirror/m-p/443946#M500</guid>
      <dc:creator>AmmarMhowwala</dc:creator>
      <dc:date>2023-05-02T11:55:03Z</dc:date>
    </item>
  </channel>
</rss>

