Im trying to create an exchange powershell script to run these three following commands to check my exchange server status every so often.
Test-ServiceHealth servername | ft Role,RequiredServicesRunning -auto
test-mapiconnectivity -server "servername"
test-mailflow servername -targetemailaddress firstname.lastname@example.org
What would be the easiest way to code this via powershell into a csv file and then send to me it as an attachment via email.