Advertisement
sheldonalman

Update Exchange 2010 Transport Rule From Text File

Jul 6th, 2013
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Update Exchange 2010 Transport Rule From Text File Using Powershell
  2. #Sheldon Alman - sheldonalman at gmail.com
  3. if (test-path C:\sig.txt )
  4. {
  5.  $signature = Get-Content "C:\sig.txt"
  6.  set-TransportRule -Identity 'External Email Disclaimer' -Name 'External Email Disclaimer' -Comments 'Appends disclaimer to all email that is sent externally.' -ApplyHtmlDisclaimerLocation 'Append' -ApplyHtmlDisclaimerText $signature -ApplyHtmlDisclaimerFallbackAction 'Wrap'
  7. }
  8. else
  9. {
  10.  write-eventlog -logname Application -source MSExchangeTransport -eventID 999 -entrytype Error -message "The signature script failed to run" -category 1 -rawdata 10,20
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement