cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring - Automated emailing of last FSA archive log

Murd
Level 3
Hi all, Though I would post this as I was unable to find another way to do it, basically it’s a powershell script to email you the log of your last Scheduled FSA archive. I run this a couple of hours after the scheduled archive. It’s a little raw but the frame work is all there, please feel free to critique. ######################## ### ### ###sendlastnightslog.ps1### ### ### ######################## #Find and get the last log $archivedir = 'C:\Program Files (x86)\Enterprise Vault\Reports\FSA\File System Archiving Task\ArchiveScheduled\Completed' $lastdir = dir $archivedir | sort -Property LastWriteTime | select -Last 1 $currentdir = $archivedir + "\" + $lastdir.name $todaysfile = dir $currentdir $file = $currentdir + "\" + $todaysfile.Name #send it to me as a email $smtpServer = "smtpServe.someplace.com" $msg = new-object Net.Mail.MailMessage $att = new-object Net.Mail.Attachment($file) $smtp = new-object Net.Mail.SmtpClient($smtpServer) $msg.From = "dev_ev@someplace.com" $msg.To.Add("user1@someplace.com") $msg.To.Add("user2@someplace.com") $msg.Subject = "DEV - Daily EV Archive log" $msg.Body = "Please check attached file for errors" $msg.Attachments.Add($att) $smtp.Send($msg) $att.Dispose() $archivedir = "" $lastdir = "" $currentdir = "" $todaysfile = "" $file = ""
1 REPLY 1

Rob_Wilcox1
Level 6
Partner
I did something along these lines before : https://www-secure.symantec.com/connect/forums/does-anyone-have-powershell-script-will-automatically...
Working for cloudficient.com