• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Powershell Disk Health Check

Grentz

Fully [H]
2FA
Joined
May 5, 2006
Messages
17,320
Figured this might be useful to someone around here.

I am running Server 2012 and needed something to alert on issues with my Storage Space Mirrors and a RAID array. Windows has a health status that reads "OK" when everything is fine to its knowledge.

This is a powershell script that reads that status, then alerts to email if it senses that status as anything other than OK.

Code:
$WMI = Get-WMIObject -Computer localhost -Class Win32_DiskDrive
$body = "URGENT Disk Report `n`n"
$allclear = ""
ForEach ($Drive in $WMI){
    $body += $Drive.Caption + ": " + $Drive.Status + "`n"
    if ($Drive.Status -ne "OK") { $allclear = "N" }
    
}
$date = Get-Date
$body += "`nExecuted at " + $date  

if ($allclear -eq "N") {

$EmailFrom = "EMAIL ADDRESS"
$EmailTo = "EMAIL ADDRESS" 
$Subject = "ISSUE DETECTED"  
$SMTPServer = "smtp.gmail.com" 
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) 
$SMTPClient.EnableSsl = $true 
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("USERNAME", "PASSWORD"); 
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)
}
else { Write-host "No Issues Detected" }
 
Back
Top