<?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: Snapmirror Monitoring Script in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38118#M1746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Connect-NaController yourcontroller&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;$sms = Get-NaSnapmirror&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;$smerror = $null&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;$newline = "`n"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;foreach ($sm in $sms){&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($sm.state -ne "snapmirrored"){&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write-Host "Errors found. `tSource: $($sm.source)`t`t Destination: $($sm.Destination) `t`tState: $($sm.State)"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $smerror += @($sm.Source,$sm.Destination,$sm.State,$newline)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Send-MailMessage -To "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:you@yourdomain.com" target="_blank"&gt;you@yourdomain.com&lt;/A&gt;&lt;SPAN&gt;" -From "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:powershell@yourdomain.com" target="_blank"&gt;powershell@yourdomain.com&lt;/A&gt;&lt;SPAN&gt;" -Subject "Snapmirror errors found!" -Body "$smerror" -BodyAsHtml -SmtpServer yoursmtpserver&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm making some assumptions here though. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. I'm assuming you're using powershell v3 and DataOntap toolkit v3.0. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I'm assuming you have cached credentials to your filers via add-nacredential. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. You're able to make send-mailmessage look pretty &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.netapp.com/5.0.1/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, I wouldn't modify this script to run in a loop forever - That's generally a no-no with powershell. Use task scheduler (or whatever other tasking tool) to launch it at set intervals.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Sep 2013 21:34:55 GMT</pubDate>
    <dc:creator>JOHNGARRETT</dc:creator>
    <dc:date>2013-09-13T21:34:55Z</dc:date>
    <item>
      <title>Snapmirror Monitoring Script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38108#M1742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone out there have a Powershell Snapmirror Monitoring Script.&amp;nbsp;&amp;nbsp; We have 4 filers that are behind a firewall and can not use OpsManager to provide this information.&amp;nbsp;&amp;nbsp; We are looking for somthing that will provide a status&amp;nbsp; back to SA's&amp;nbsp; via email if&amp;nbsp; a&amp;nbsp; snapmirror fails. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:01:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38108#M1742</guid>
      <dc:creator>von</dc:creator>
      <dc:date>2025-06-05T06:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Snapmirror Monitoring Script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38113#M1744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a direct answer, but if you have a windows (or linux) system inside the firewall (which seems to be the case, if you a proposing a powershell script that will have access to the filers) you could have a SaaS system that uses collectors to get the information and alert you appropriately, like &lt;A href="http://www.logicmonitor.com/" target="_blank"&gt;LogicMonitor&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 23:23:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38113#M1744</guid>
      <dc:creator>steve_francis</dc:creator>
      <dc:date>2013-06-03T23:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Snapmirror Monitoring Script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38118#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Connect-NaController yourcontroller&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;$sms = Get-NaSnapmirror&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;$smerror = $null&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;$newline = "`n"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;foreach ($sm in $sms){&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($sm.state -ne "snapmirrored"){&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write-Host "Errors found. `tSource: $($sm.source)`t`t Destination: $($sm.Destination) `t`tState: $($sm.State)"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $smerror += @($sm.Source,$sm.Destination,$sm.State,$newline)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Send-MailMessage -To "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:you@yourdomain.com" target="_blank"&gt;you@yourdomain.com&lt;/A&gt;&lt;SPAN&gt;" -From "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:powershell@yourdomain.com" target="_blank"&gt;powershell@yourdomain.com&lt;/A&gt;&lt;SPAN&gt;" -Subject "Snapmirror errors found!" -Body "$smerror" -BodyAsHtml -SmtpServer yoursmtpserver&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm making some assumptions here though. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. I'm assuming you're using powershell v3 and DataOntap toolkit v3.0. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I'm assuming you have cached credentials to your filers via add-nacredential. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. You're able to make send-mailmessage look pretty &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.netapp.com/5.0.1/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, I wouldn't modify this script to run in a loop forever - That's generally a no-no with powershell. Use task scheduler (or whatever other tasking tool) to launch it at set intervals.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 21:34:55 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Snapmirror-Monitoring-Script/m-p/38118#M1746</guid>
      <dc:creator>JOHNGARRETT</dc:creator>
      <dc:date>2013-09-13T21:34:55Z</dc:date>
    </item>
  </channel>
</rss>

