Jean M 7 Posted October 2, 2019 Posted October 2, 2019 Hi, What is the maximum command size we can use? (for Windows, MacOS and Linux) I'm asking because tried a long command it seems that was not executed. Thanks.
ESET Staff MartinK 384 Posted October 3, 2019 ESET Staff Posted October 3, 2019 If I recall correctly, limit of total size is very large - I think you would have higher probability that you hit limit of script interpreter first. There is definitely some limit of line in BAT files which might be problem. I would recommend to create BAT/sh file manually and try to execute on target machine just to verify it actually works. Also be aware that scripts are executed in AGENT's security context which might have access to specific system or network resources, tied to domain users.
ESET Staff janoo 11 Posted October 7, 2019 ESET Staff Posted October 7, 2019 Hi, there are a few restrictions here: Web Console can process 32768 characters. However, if you copy-paste a longer command, it would silently cut out the end. Linux and Mac are able to process the full length of the command. Windows has restriction for 8191 (read more https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation) I hope this helps. Peter Randziak 1
Jean M 7 Posted October 7, 2019 Author Posted October 7, 2019 Hi! This helps even if it was not the root cause for our issue (now fixed btw! with help of your recommendations) it gives us information on what are the limits. In order to test our run commands we, as you suggested, run the commands in the destination host and using the agent context (in Windows, "Local System" privileges) it helps a lot. For others information if they run into the same problem: to do this we used psexec from SysInternals (psexec -i -s cmd.exe). Thanks a lot! Jean M.
Recommended Posts