<?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 for snapmirror in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72592#M3595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing you might try is to just look at your variable after the failure. I.e., enter $line.source and that'll show you the value of that variable the last time it was changed. You might find that there's an illegal character in your vol name, which could happen depending on how you generated the .csv to begin with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Sep 2013 21:04:16 GMT</pubDate>
    <dc:creator>JOHNGARRETT</dc:creator>
    <dc:date>2013-09-13T21:04:16Z</dc:date>
    <item>
      <title>powershell for snapmirror</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72576#M3592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello!&lt;/P&gt;&lt;P&gt;i am new to powershell and am trying to write a scritp to snapmirror more than 50 volumes using snapmirror, source and destination volumes have been created .Destinations volumes have been restricted.&lt;/P&gt;&lt;P&gt;With some online help i have this scrit to snapmirror volumes but it fails can someone point out the right way to get this done.&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;$csv = Import-Csv C:\volume1.csv&lt;/P&gt;&lt;P&gt;$filer1 = "10.168.55.13"&lt;/P&gt;&lt;P&gt;$filer2 = "10.168.55.14"&lt;/P&gt;&lt;P&gt;foreach ($line in $csv) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoke-NaSnapmirrorInitialize -Source $filer1:$line.source -Destination $filer2:$line.dest&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My csv file looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/23083_pastedImage_2.png" style="width: 136px; height: 62px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get the following error&lt;/P&gt;&lt;P&gt;Invoke-NaSnapmirrorInitialize : Invalid destination @{source=vol1; dest=vol1}.dest: invalid character found in the vol&lt;/P&gt;&lt;P&gt;At C:\Users\xyz\snapmirrortest.ps1:5 char:34&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoke-NaSnapmirrorInitialize &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; -Source $filer1:$line.source -Destination $filer2:$line.dest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : InvalidOperation: (10.168.55.14:NaController) [Invoke-NaSnapmirrorInitialize], ESNAPMIRR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNaSnapmirrorInitialize&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoke-NaSnapmirrorInitialize : Invalid destination @{source=vol2; dest=vol2}.dest: invalid character found in the vol&lt;/P&gt;&lt;P&gt;At C:\Users\xyz\snapmirrortest.ps1:5 char:34&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoke-NaSnapmirrorInitialize &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; -Source $filer1:$line.source -Destination $filer2:$line.dest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : InvalidOperation: (10.168.55.14:NaController) [Invoke-NaSnapmirrorInitialize], ESNAPMIRR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNaSnapmirrorInitialize&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:54:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72576#M3592</guid>
      <dc:creator>NAIRSATISH</dc:creator>
      <dc:date>2025-06-05T05:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: powershell for snapmirror</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72581#M3593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Usually when I run into issues like that it is due to a char at the end of the line in the csv file. you may want to look at the .trim() function to help with the problems. to diagnose if this is your issue you can use the .length() function to see how many chars are in your variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 17:24:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72581#M3593</guid>
      <dc:creator>olson</dc:creator>
      <dc:date>2013-09-11T17:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: powershell for snapmirror</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72587#M3594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi olson,&lt;/P&gt;&lt;P&gt;i tried looking up those functions online but could not figure out how to use it.&lt;/P&gt;&lt;P&gt;with the script that i have where and how should i insert these funcations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 17:56:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72587#M3594</guid>
      <dc:creator>NAIRSATISH</dc:creator>
      <dc:date>2013-09-11T17:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: powershell for snapmirror</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72592#M3595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing you might try is to just look at your variable after the failure. I.e., enter $line.source and that'll show you the value of that variable the last time it was changed. You might find that there's an illegal character in your vol name, which could happen depending on how you generated the .csv to begin with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 21:04:16 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-for-snapmirror/m-p/72592#M3595</guid>
      <dc:creator>JOHNGARRETT</dc:creator>
      <dc:date>2013-09-13T21:04:16Z</dc:date>
    </item>
  </channel>
</rss>

