Kaseya Community

Write environment var to textfile

  • Hello,

    I llike to write an environment variable itself to a textfile. Is there any way.
    Like write the command copy \\%computername% to textfile. But if i run the script it writes \\server01 to the file.

    Have tried the constant variable but doesnt work. 

  • Need escape characters. Try executing shell command like this: copy \\^%computername^%

  • Hello SMason,

    That did the trick. Thank you.