I Need
1. Run script by Schedule Task daily
2. Automatic Send mail to My group
3.Need to report follow with my image
I need to use power shell can run check status replication between DC with additional and has automate send email to my group IT
Resource :
Windows 2008 =DC
windows 2008= Additional DC
windows2003= Additional DC e-mail server = smtp port:2525
I follow step this link
http://technodrone.blogspot.com/2010...atus-with.html
$from = "Replication Status<Domain@mail.com>" $to = "User Group<Domain@mail.com>" #Collect the replication info #Check the Replication with Repadmin $workfile =C:\rep\repadmin.exe /showrepl * /errorsonly >csv $results = ConvertFrom-Csv -InputObject $workfile | where {$_.'Number of Failures' -ge 1} $strOutFile = "C:\rep\Check-Replication.htm" #Here you set the tolerance level for the report $results = $workfile | where {$_.'Number of Failures' -gt 1 } if ($results -ne $null ) { $results = $results | select "Source DC", "Naming Context", "Destination DC" ,"Number of Failures", "Last Failure Time", "Last Success Time", "Last Failure Status" | ConvertTo-Html } else { $results = "There were no Replication Errors" } #Send-MailMessage -From $from -To $to -Subject "Daily Forest Replication Status" -SmtpServer "smtp.domain.com" -BodyAsHtml ($results | Out-String) $filedate = get-date $filedate = $filedate.ToString() $results = "" + $filedate + "" + $results + "" $results | Out-File $strOutFile