Kaseya Community

sendMail command - Is it possible to pass through the computer name?

  • Is it is possible to pass into the Subject line or Body Message dynamically, the computer name?

     

  • Absolutely. Use this variable

    #vAgentConfiguration.machName# for the machine or

    #vMachine.Machine_GroupID# for the machine and group.



    Added variable
    [edited by: JB1975 at 7:31 AM (GMT -7) on Aug 16, 2019]
  • Use #vAgentConfiguration.machName#

  • Thanks everyone for the information.

    Can I ask where the list of all available VSA variables can found, documentation wise?

    I want the SendMail function to not only identify the node being actioned (which I have now) but for this email to be only sent to the admin you ran the script in the first place (if this is possible).

  • Hi Chris,

    The variables are found dotted around in various online help documentation such as the Agent Procedure and Service Desk help sections, but this forum post and comments is very helpful ;-)

    community.kaseya.com/.../109546.aspx

  • Thanks JB1975, very much appreciated.

  • A lot of the variables can be found under the Online Manual under Database Views:

    help.kaseya.com/.../9050000

    If your looking for Computer Name then use:

    #vMachine.ComputerName# = Computer Name

    If your looking for Agent Name which has already been listed:

    #vAgentConfiguration,Machine_GroupID# = A concatenated representation of the machine id and the group id it is associated with.

    #vAgentConfiguration.machName# = Machine Name used for each agent

    #vAgentConfiguration.groupName# = Organization, then machine group the machine is assigned to.

    If your looking for the info on the VSA user who ran the script then use (found in the Online Manual under Automatic Administrator Variables help.kaseya.com/.../9050000):

    #adminDefaults.adminEmail# - Email address of the VSA user who scheduled the agent procedure.

    #adminDefaults.adminName# - Name of the VSA user who scheduled the agent procedure.

    #scriptIdTab.scriptName# - Name of the agent procedure

    If your looking for info on the Agent Procedure then use:

    #vScriptStatus.scriptName# = Name of procedure

    #vScriptStatus.LastExecTime# = Time stamp string representing the last time that the procedure was executed

    #vScriptStatus.lastExecStatus# = Status of the last execution.

    If you need to pull the contents of a Custom Audit Field you created then use the following:

    If your Custom Audit Field is named 'test' then the variable will be #vSystemInfoManual.test#



    removed Tags automatically setup
    [edited by: Gabriel Medina at 9:18 AM (GMT -7) on Aug 20, 2019]