<?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 - Create Snapmirror Relationship with autocreating destination in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/449741#M43048</link>
    <description>&lt;P&gt;Hy, I'm facing the same issue, could you please share your trick ? Br&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 16:32:56 GMT</pubDate>
    <dc:creator>Fux</dc:creator>
    <dc:date>2023-12-14T16:32:56Z</dc:date>
    <item>
      <title>Powershell - Create Snapmirror Relationship with autocreating destination</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/445609#M42527</link>
      <description>&lt;P&gt;Hello together,&lt;/P&gt;&lt;P&gt;I just started to code with the Ontap Powershell Module. I want to know, is there a way, to automatically create the destination volume for the snapmirror relation?&lt;BR /&gt;I tried it with the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for($i=0; $i -le ($VolsToCreate).Count; $i++){&lt;BR /&gt;$vServerForSnapmirror = ($VolsToCreate).vServer[$i]&lt;BR /&gt;New-NcSnapmirror -SourceVserver ($VolsToCreate).Vserver[$i] -DestinationVserver $DestinationvServerName -SourceVolume ($VolsToCreate).Name[$i] -DestinationVolume ($SnapMirrorDestinatioNVols).Name[$i] -RelationshipType XDP -CreateDestination $true&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it seems that $true is not working and the error I receive is not helping either. The error says that I should write down a valid command of type&amp;nbsp;DataONTAP.C.Types.Snapmirror.CreateDestination&lt;/P&gt;&lt;P&gt;I also tried to create the volumes manually but I cant create volume of type DP which is a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe some of you can help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:47:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/445609#M42527</guid>
      <dc:creator>TzwaynY</dc:creator>
      <dc:date>2025-06-04T09:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - Create Snapmirror Relationship with autocreating destination</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/445724#M42541</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I solved the problem on my own. I let the script create the volumes with DP on the destination with an RESTAPI Post. Thats the only way I found how it works.&lt;/P&gt;&lt;P&gt;If anyone needs to know how I did the API post, let me know and I will post the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards to everyone&lt;/P&gt;&lt;P&gt;- Kai&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 06:54:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/445724#M42541</guid>
      <dc:creator>TzwaynY</dc:creator>
      <dc:date>2023-07-03T06:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - Create Snapmirror Relationship with autocreating destination</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/449741#M43048</link>
      <description>&lt;P&gt;Hy, I'm facing the same issue, could you please share your trick ? Br&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 16:32:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/449741#M43048</guid>
      <dc:creator>Fux</dc:creator>
      <dc:date>2023-12-14T16:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - Create Snapmirror Relationship with autocreating destination</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/450627#M43218</link>
      <description>&lt;P&gt;Hi Fux, sorry for the late repsone. Do you still need it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 14:16:06 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/450627#M43218</guid>
      <dc:creator>TzwaynY</dc:creator>
      <dc:date>2024-02-05T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - Create Snapmirror Relationship with autocreating destination</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/450630#M43219</link>
      <description>&lt;P&gt;Yes please&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 15:00:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/450630#M43219</guid>
      <dc:creator>Fux</dc:creator>
      <dc:date>2024-02-05T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - Create Snapmirror Relationship with autocreating destination</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/451063#M43307</link>
      <description>&lt;P&gt;Hey Fux,&lt;/P&gt;&lt;P&gt;finally I had the time to look my code up in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how I did it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I fetched the Names which needed to be 1:1 in my case before and pasted them into a variable which I filled into the PAYLOAD of my API Post:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;                            $PAYLOAD = @{
                                "name"       = "VOLUMENAME"
                                "aggregates" = @(
                                    @{
                                        "name" = "AGGREGATENAME"
                                    }
                                )
                                "size"       = "SIZE" + "UNIT"
                                "svm"        = "DESTINATIONVSERVERNAME"
                                "type"       = "DP" #This is what you need!
                                "language"   = "VOLUMELANGUAGE"
                                "tiering"    = 
                                @{
                                    "policy" = "TIERINGPOLICY"
                                }
                            } | ConvertTo-Json  
                            $RESPONSE = Invoke-RestMethod -Uri $VOLUMEURL -Method Post -Headers $HEADERS -Body $PAYLOAD -ErrorAction Stop -SkipCertificateCheck
                            $RESPONSE | ConvertTo-Json&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;As you can see, the "type" of the Volume it "dp" which is exactly what you will need, in order to create the dp volumes on your destination.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps. Feel free to ask me, if you need further assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 10:30:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-Create-Snapmirror-Relationship-with-autocreating-destination/m-p/451063#M43307</guid>
      <dc:creator>TzwaynY</dc:creator>
      <dc:date>2024-02-28T10:30:23Z</dc:date>
    </item>
  </channel>
</rss>

