<?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 get-nasnapmirror question in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42632#M2019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a script that will list the snapmirror status for my filers and send the results to me in an e-mail.&amp;nbsp; When I type get-nasnapmirror FILERNAME it just brings me right back to the command prompt with no data returned.&amp;nbsp; I have also tried get-nasnapmirror FILERNAME:volume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I type get-nasnapmirror by itself I get the result of a filer, but not the one I am trying to get.&amp;nbsp; I am not sure how or why it is going to that particular filer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 07:11:13 GMT</pubDate>
    <dc:creator>kurt_westenhoefer</dc:creator>
    <dc:date>2025-06-05T07:11:13Z</dc:date>
    <item>
      <title>get-nasnapmirror question</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42632#M2019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a script that will list the snapmirror status for my filers and send the results to me in an e-mail.&amp;nbsp; When I type get-nasnapmirror FILERNAME it just brings me right back to the command prompt with no data returned.&amp;nbsp; I have also tried get-nasnapmirror FILERNAME:volume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I type get-nasnapmirror by itself I get the result of a filer, but not the one I am trying to get.&amp;nbsp; I am not sure how or why it is going to that particular filer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 07:11:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42632#M2019</guid>
      <dc:creator>kurt_westenhoefer</dc:creator>
      <dc:date>2025-06-05T07:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: get-nasnapmirror question</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42636#M2020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Kurt.&amp;nbsp; When you issue Connect-NaController, the resulting connection is cached in $global:CurrentNaController, and this value is used by all subsequent Toolkit cmdlet invocations &lt;EM&gt;unless &lt;/EM&gt;you specifically provide the target using the -Controller parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to get Snapmirror relationships on a single controller, try:&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 &amp;lt;controllerName&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;Get-NaSnapmirror&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get Snapmirror relationships on a different controller, or in a loop context, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;$controller = Connect-NaController &amp;lt;controllerName&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;Get-NaSnapmirror -Controller $controller&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get a specific relationship:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;Get-NaSnapmirror -Location &amp;lt;sourceOrDestinationName&amp;gt; -Controller &lt;SPAN style="color: #0000ff;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;Connect-NaController &amp;lt;controllerName&amp;gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this last case, the -Location parameter is just a string that matches the values returned by Get-NaSnapmirror or the values in /etc/snapmirror.conf.&amp;nbsp; Don't forget that you can use wildcards in the -Location parameter to expand your query results.&amp;nbsp; Also, nearly all Toolkit cmdlets have one or more examples in their online help, i.e. '&lt;SPAN style="color: #0000ff; font-family: courier new,courier; "&gt;man Get-NaSnapmirror -Examples&lt;/SPAN&gt;'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 17:13:00 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42636#M2020</guid>
      <dc:creator>cknight</dc:creator>
      <dc:date>2010-08-02T17:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: get-nasnapmirror question</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42644#M2021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way to work with&amp;nbsp; multiple controllers in your loop is to create a collection of naconnection objects.&amp;nbsp; There's an example here: &lt;A _jive_internal="true" href="https://community.netapp.com/docs/DOC-6293" target="_blank"&gt;http://communities.netapp.com/docs/DOC-6293&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 18:34:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42644#M2021</guid>
      <dc:creator>fjohn</dc:creator>
      <dc:date>2010-08-03T18:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: get-nasnapmirror question</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42648#M2022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what I have so far.&amp;nbsp; I am stuck trying to get the results of this script in the body of the e-mail I am sending at the end of the script.&amp;nbsp; I can get it to output the results to the screen, but not in the body of the email.&amp;nbsp; Can someone tell me what I am doing wrong.&amp;nbsp; I am pretty new to PS so I am assuming I am missing something obvious.&amp;nbsp; I tried using Write-Output in the loop, but I couldn't get that to work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Import-Module &lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;DataONTAP&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connect-NAController &lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;netapp03&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$sm &lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Courier New; "&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;Get-NaSnapmirror&lt;/SPAN&gt;&lt;STRONG style=": ; color: #800080; font-size: 10pt; font-family: Courier New; "&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$SMTPSRV &lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Courier New; "&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"server.domain.com"&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$EmailFrom =&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;&lt;A class="jive-link-email-small" href="mailto:user@domain.com" target="_blank"&gt;user@domain.com&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$EmailTo &lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Courier New; "&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;&lt;A class="jive-link-email-small" href="mailto:user@domain.com" target="_blank"&gt;user@domain.com&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New; "&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New; "&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;) {&lt;/SPAN&gt;&lt;STRONG style=": ; color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write-Host &lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;.SourceLocation &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"--&amp;gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;.DestinationLocation &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"--&amp;gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;.LagTime &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"--&amp;gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;.State &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"--&amp;gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$sm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;.Status&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send-MailMessage &lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;EM&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;-To&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$EmailTo&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;-Subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"Snapmirror Status"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;-Body&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Courier New; "&gt;"blahblahblah"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;-From&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$EmailFrom&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;-SmtpServer&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New; "&gt;$SMTPSRV&lt;/SPAN&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Courier New; color: #5f9ea0; font-size: 10pt;"&gt;&lt;SPAN style="font-family: Courier New; color: #5f9ea0; font-size: 10pt;"&gt;&lt;SPAN style="font-family: Courier New; color: #5f9ea0; font-size: 10pt;"&gt;&lt;STRONG style=": ; font-size: 2; font-color: #5f9ea0; font-family: 'Courier New'; "&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #5f9ea0; font-size: 10pt; font-family: Courier New; "&gt;&lt;EM&gt;&lt;EM&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;STRONG style=": ; font-size: 2; font-color: #5f9ea0; font-family: 'Courier New'; "&gt;&lt;P&gt;&lt;/P&gt;&lt;/STRONG&gt;&lt;STRONG style=": ; font-size: 2; font-family: 'Courier New'; font-color: #5f9ea0; "&gt;&lt;P&gt;&lt;/P&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:20:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42648#M2022</guid>
      <dc:creator>kurt_westenhoefer</dc:creator>
      <dc:date>2010-08-05T13:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: get-nasnapmirror question</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42653#M2023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if your foreach loop you just need to add the results to a variable instead of doing a write-host.&amp;nbsp; Then reference that new variable as the body in the send-mailmessage command. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach ($item in $collection) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $a += $item&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send-MailMessage -To $EmailTo -Subject "Snapmirror Status" -Body $a -From $EmailFrom -SmtpServer $SMTPSRV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that would get the job done but you can probably do a little bit more to format the information to make it more readable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:47:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/get-nasnapmirror-question/m-p/42653#M2023</guid>
      <dc:creator>wedge1212</dc:creator>
      <dc:date>2010-08-05T13:47:57Z</dc:date>
    </item>
  </channel>
</rss>

