Kaseya Community

How do I pass in a variable to a DOS command?

  • I am using the following to try to delete a domain user account residing in the local administrators group on a Windows Laptop.

    I am using the getvariable command to precapture the userid in question.

    Is it possible to pass the userid through to a DOS command?

    Will the executeShellCommand accept the userid (aka #username# variable)?

    Any advice would be helpful.

  • Yes the executeShellCommand does accept the variables properly.

  • On the flip side, are the OS environment variables available to the procedures? (e.g. %appdata%)

  • Yes those are available as well

  • Thanks!