I am trying to setup error handling in my powershell script and am unsure how to do it.
My powershell script disables one Transport Rule in Exchange and Enables a different Transport Rule. Once Rule has been enabled an email is sent to me (For privacy reasons I have changed email address and hostname)
I know I have to setup some kind of Try and Catch Variables so I can add Error Handling to Powershell script but unsure where to start.
Any help would be much appreciated. I have attached a copy of the powershell script in a txt file.