Last active
August 29, 2015 14:10
-
-
Save normansolutions/7f2fd50be6ec103b61ca to your computer and use it in GitHub Desktop.
For use on blog post: http://normansolutions.co.uk/stamp-an-isams-report-with-the-current-username
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################# | |
$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