Skip to content

Instantly share code, notes, and snippets.

@normansolutions
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normansolutions/7f2fd50be6ec103b61ca to your computer and use it in GitHub Desktop.
Save normansolutions/7f2fd50be6ec103b61ca to your computer and use it in GitHub Desktop.
#################################################
$smtpServer="Your SMTP Server"
$from = "Your From Email Address"
$emailaddress = "Your Send To Email Addressk"
$subject = "The reportingServicesReportSelection.asp file has changed"
$body = "The reportingServicesReportSelection.asp file has changed, you need to re-add the script"
$strReference = "Your Path To An Original Copy Of The File"
$strDifference = "Your Path To a Deployed Copy Of The File"
#################################################
if (Compare-Object (gc $strReference) (gc $strDifference)) {
Send-Mailmessage -smtpServer $smtpServer -from $from -to $emailaddress -subject $subject -body $body -bodyasHTML -priority High
}
else {
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment