Search the Community
Showing results for tags 'shell'.
Found 4 results
Hi all, I have been working with Automate Scripts for quite some time now and I have one issue which support cannot seem to understand. Everytime I use a Shell Function (Shell as Admin, Shell, Shell Enhanced), the variable %shellresult% always return OK, whether I am running an actual shell command (Like ping google.com) or if I am executing a powershell script. Do you have any idea on what could cause the issue. See one script result and content in attachement.
I've noticed lately that a lot of the time when I run commands against Mac OS X endpoints, the shell returns "OK" rather than the expected result of the command. For example: ls /Applications OK This happens when running commands interactively as well as when the commands are executed by a script - I enable script engine logging (and even explicitly log %shellresult% to the console) and the same thing happens: a long list of comments on what the command is doing, with "OK"s between them. Does anyone know why this is happening and/or how to fix it? Some Mac endpoints respond fine to shell commands, but then stop. Others have a chain of "OK" entries in recent history but then respond fine to interactive commands when I test them. Makes no sense to me.
I am getting a little frustrated trying to get a script to work that should have been very simple. There is a single line command that we can enter in command prompt to enable WinRM on a computer. If we run it in command prompt locally on the computer it works great. If we run it via command prompt in Automate it works great. If we run it as a line in a script it fails. I have tried both Shell and Shell as Admin. I have had this issue with other scripts too and usually if it fails on one, then it works on the other. Can anyone answer why this is happening? I would image that Shell would work the exact same way as using the Command Prompt built into Automate.
Hi, I am trying to pass an email address to an EXE. The email address is an ask at runtime parameter. The executable is being run via SHELL as Admin, I am pretty sure the @ sign is getting eaten and the mail address is not making it to the command line. @sendemailto@ has been set to email@example.com shell as admin the following line: c:\MyProgram.exe /CustName="%clientname%" /LocName="%locationname%" /SendEmailTo="@sendmailto@" the actual command should look like this: c:\MyProgram.exe /CustName="TheClientsName" /LocName="TheClientsLocation" /SendEmailTo="me@mydomain" thanks, Bob