Skript, mis leiab application log'ist viimase nädala joosul tehtud "Error" tüüpi kirjed ja edastab need administraatorile e-kirjana Powershell
From ICO wiki
<source lang="powershell"> $emailFrom = "user@yourdomain.com" $emailTo = "kaspar.prei@gmail.com" $subject = "error logid" $body = Get-EventLog -logname application -EntryType error -newest 25 $smtpServer = "mail.starman.ee" $smtp = new-object Net.Mail.SmtpClient($smtpServer) $smtp.Send($emailFrom, $emailTo, $subject, $body)