HardKnoX, your solution will leave the password visible in the agent procedure log. Also not a good solution.
I think Kaseya needs a simple feature to define a variable as a password within an Agent procedure and then Kaseya will keep that information hidden.