SHARE
TWEET

Untitled

a guest Jul 17th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. If(Get-Content -Path $dir$LatestRefreshLog | %{$_ -match "RESTORE DATABASE successfully processed"})
  2.   {
  3.    #Write-Host "The latest restore log file is $LatestRefreshLog"
  4.    $msg.Subject = "SQLServer QA Refresh Status"
  5.    $msg.Body = "QA DB is refreshed successfully."
  6.    $smtp.Send($msg)
  7.   }
  8.   else
  9.   {
  10.    #Write-Host "The latest restore log file is $LatestRefreshLog"
  11.    $msg.Subject = "SQLServer QA Refresh Status"
  12.    $msg.Body = "QA DB refresh is having issues.Restore failed."
  13.    $smtp.Send($msg)
  14.  } }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top