I am using the Send-MailMessage (I know it is obsolete). I am wanting to include a hyperlink in the body. The hyperlink is derived from a variable. For instance $link. I can set the body = $Link and it will place the text in the email. But I want a link. So I have set following:
-body '<a href=$Link>Link</a>' `
-BodyAsHTML
It will generate the email with the hyperlink, but the link is $Link (not the var value. I have tried with $Link and “$Link” I can put a static path in and it works, but it changes. I need it to be derived from $Link.