检查磁盘利用率并且定期发送告警邮件
$c = Get-WmiObject -Class Win32_LogicalDisk | where {$_.size} | select-object -Property deviceid, @{N='Free';E={[System.Math]::round($_.freespace / $_.size * 100)}} | Where-Object -FilterScript {$_.deviceid -eq "c:"} if ($c.free -le 10) {Send-MailMessage -SmtpServer 172.17.9.119 -From ALERT@COMPANY.COM -To san.zhang@tcs.com -Subject "Hard Disk Alert" -Body "The hard disk utilization is HIGN!!!"}