i m looking for a way to get change the color of a text if its there. The Idea is that, i have some text output from powershell that i want to send to Email with use of -BodyAsHTML.
$body = "
<html><body>
<font color='FF0000'>$alarmMessage</font><br /><br />
<body><html>
"
Send-MailMessage -to $recipients -SmtpServer "TEST" -from "TEST" `
-Subject "TEST" -BodyAsHTML $body -Encoding ([System.Text.Encoding]::UTF8)
alarmMessage has all the text in it. so i want to check if the alarmMessage has something like "not recieved", so only ""not recieved" should be red.
how do i do that?