Help Keep Brothers Together

2029868_1409042955.5137

In 2012 we adopted a beautiful son from foster care. On August 19th 2014 we were chosen to bring his four day old brother home from the hospital. That Friday we were notified that DSS intends to move him to be placed with a not quite two year old sibling who has never met him. They also intend on disrupting the two year old’s placement in order to put them into a completely different home. I was told their goal was to re unify siblings. So it makes no sense to move my son’s baby brother. My child already knows him, understands that this is his brother, and is bonded with him. We will possibly need a lawyer before this is all done. And if we do, we’ll need one quickly. We are trying to raise enough funds to retain legal representation for our son’s brother.

Please share the link or donate either or will help..
http://www.gofundme.com/dk8vhs

No tags for this post.
logo-powershell1

Powershell email notification on errors in a logfile

Ran into a case that would be nice to receive an email alert based upon a a phrase or error in a log/txt file. Well after I set it up and tested it I decided to do something different but this did work quite well so I thought I’d share.

Remember to execute this with powershell, I used the variable $env:computerName to pull the hostname of the pc. You can just put an email address if you want.

Code starts below the ##

##search error in log
if (Select-String -Path “\\server\d$\Program Files\BackupSoftware\log\server.log” -pattern “Could not open disk”)
{
function sendMail{

Write-Host “Sending Email”

#SMTP server name
$smtpServer = “mail.yourdomain.com”

#Creating a Mail object
$msg = new-object Net.Mail.MailMessage

#Creating SMTP server object
$smtp = new-object Net.Mail.SmtpClient($smtpServer)

#Email structure
$msg.From = “$env:computerName@yourdomain.com”
$msg.ReplyTo = “$env:computerName@yourdomain.com”
$msg.To.Add(“you@yourdomain.com”)
$msg.subject = “Backup Errors”
$msg.body = “Backup failed on $env:ComputerName. Please check the error logs on”

#Sending email
$smtp.Send($msg)

}

original script was from technet but I don’t have the link.

Tags: , ,