This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Powershell Output to an Email message

I am running a powershell script to parse a log file. I would like to have the error message be part of the alert email. However, I cannot seem to find it. Does anyone have any idea what the variable would be?

Thank you!

E1: Adding more information

This is the Log Parse (Powershell) Default Template

When I run a test on it I see the following and would like to include it in the email message:

Output:      ==============================================

Statistic: 0

Message: No newly found strings

  • Try these 2 alert variables.

    Component Statistic: ${N=SwisEntity;M=ComponentAlert.StatisticData}

    Component Message: ${N=SwisEntity;M=ComponentAlert.ComponentMessage}

  • On the Alert email action, within the body of the message this would be the variable you would use:

    Integer:

    ${N=SwisEntity;M=MultipleStatisticData.NumericData}

    Char:

    ${N=SwisEntity;M=MultipleStatisticData.StringData}

    You can find these on the variable list within the alert actions tab.

    pastedImage_0.png

    Depending on your powershell output you can use either.