<?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 script to find failed disks in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32856#M1528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, JGPSHNTAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the script. I modified a bit and ran it.&lt;/P&gt;&lt;P&gt;Ah, I don't have a failed disk in my environment, it didn't catch anything. But no error occurred. I'll test with the script when I have a failed disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;Mariko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 07:31:17 GMT</pubDate>
    <dc:creator>MARIKOTAGAWA</dc:creator>
    <dc:date>2014-01-10T07:31:17Z</dc:date>
    <item>
      <title>powershell script to find failed disks</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32842#M1526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I'm looking for a powershell script that access to multiple filers and find failed disks on them automatically then display the disks on the terminal or ideally send the info via email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I can write a script using Get-NaDisk cmdlet. But sorry I'm lazy. If anyone has already created, could you share it with me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to run the script first thing in the morning during I'm checking email over coffee. Then open a service request to get the failed disk replaced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;Mariko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:46:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32842#M1526</guid>
      <dc:creator>MARIKOTAGAWA</dc:creator>
      <dc:date>2025-06-05T05:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: powershell script to find failed disks</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32847#M1527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm all for writing scripts, but this is something Oncommand should be doing.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember, you are never going to compete with developers especially with a program like oncommand..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you insist, I will get you started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put all the filers in a txt filer &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$filers = gc c:\filers.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$filers | % {&lt;BR /&gt;$filer = $_ &lt;/P&gt;&lt;P&gt;# Assuming you have RPC access to filer, if not you need to create credentials cache&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$c = connect-nacontroller $filer &lt;/P&gt;&lt;P&gt;$disks = get-nadisk | ? {$_.status -eq "failed"}&lt;/P&gt;&lt;P&gt;# write to file&lt;/P&gt;&lt;P&gt;$disks | ? {$_.status -eq "failed"} | ft @{e={$Filer};l="filer";Width =10},@{e={$_.name};L="Disk Name";Width=10},@{E={$_.status};L="Status";Width=10} | out-file c:\filer.log -append&lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (gc c:\filer.log -ne $Null) {&lt;/P&gt;&lt;P&gt;Send-MailMessage -To $recipients -From $sendMailAs&amp;nbsp; -Subject $subjectLine -Body "Failed Disks attached" -Priority $priority -SmtpServer $smtpServer&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;STRONG&gt;# Please note, I wrote this really quick and dirty and I didn't even test it out..&amp;nbsp; I didn't have a failed disk to check to see if the status was failed or broken But it gives you different options on how to do things&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 13:25:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32847#M1527</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2014-01-08T13:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: powershell script to find failed disks</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32856#M1528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, JGPSHNTAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the script. I modified a bit and ran it.&lt;/P&gt;&lt;P&gt;Ah, I don't have a failed disk in my environment, it didn't catch anything. But no error occurred. I'll test with the script when I have a failed disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;Mariko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 07:31:17 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32856#M1528</guid>
      <dc:creator>MARIKOTAGAWA</dc:creator>
      <dc:date>2014-01-10T07:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: powershell script to find failed disks</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32861#M1529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, JGPSHNTAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally got a failed disk in my environment and tested the script. &lt;/P&gt;&lt;P&gt;One thing I have to change was the following line. A failed disk status shows "broken" instead of "failed". Then the failed disk info was output to c:\filer.log.&amp;nbsp; It's useful script for me. Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$disks = get-nadisk | ? {$_.status -eq "failed"}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 08:42:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32861#M1529</guid>
      <dc:creator>MARIKOTAGAWA</dc:creator>
      <dc:date>2014-01-20T08:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: powershell script to find failed disks</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32866#M1530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I couldn't remember if it was failed or broken.&amp;nbsp;&amp;nbsp; But glad you got it.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, you really should be using SNMP MIBS or OCUM for this.&amp;nbsp;&amp;nbsp;&amp;nbsp; Why are you not doing that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 13:11:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32866#M1530</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2014-01-21T13:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: powershell script to find failed disks</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32871#M1531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, JGPSHNTAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I am using SNMP MIBS and OCUM. A failed disk alert message is sent by email. When a failed disk alert mail is sent, each county's staff opens a service request ticket.&lt;/P&gt;&lt;P&gt;Our environment extendes across several countries. Since disk replacement completion is not sent to me, unless I login to the filer or login to the OnCommand system console, I can't check if the disk is replaced.&amp;nbsp; In order to check which failed disk is not replaced yet, I created the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mariko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 05:41:09 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/powershell-script-to-find-failed-disks/m-p/32871#M1531</guid>
      <dc:creator>MARIKOTAGAWA</dc:creator>
      <dc:date>2014-01-27T05:41:09Z</dc:date>
    </item>
  </channel>
</rss>

