Kaseya Community

Getting input from tech and using that as vbscript input

  • So I have a script that pushes a certain domain user to the admin group that works when ran outside of Kaseya, and I would like to automate this script so I can run it on a lab of computers and push a teacher to admin on all of the computers.

    Here's what I have so far:

    impersonateUser(<Domain login info>)

    getVariable("Prompt When Procedure is Scheduled", "Enter user to push to admin:", "newadmin",...)

    executeShellCommand("<path to vbscript>.vbs #newadmin#", execute as user, ...)

    For some reason this script will run, return that it executed successfully, but when I manually check the admin groups nothing has been added.

    Anyone see anything I'm missing or know why this isn't working? This seems like a fairly simple use of the input functionality but I cannot get it working.

  • Hi,

    Not sure what <Domain login info> the script is set to use, but the account credentials will need to be a Domain Administrator/Local Administrator account on all machines for this to work.  Also, you should specify CSCRIPT.EXE //nologo <path to vscript>.vbs #newadmin# as your command line in the executeShellCommand step.  

    Hope this helps,

    Matt Warburton

    Kaseya Professional Services

  • Thanks Matt, I ended up using wscript instead of cscript because the procedure would stall out otherwise but thanks for the .exe and //nologo suggestions I think that's what did it!