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.
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).
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 ;-)
Thanks JB1975, very much appreciated.
A lot of the variables can be found under the Online Manual under Database Views:
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#