product icon

How to Run an Automated PowerShell, JavaScript, or Python Script

    Create automated scripts that you can run on multiple devices without user interaction.

    Note: To run automated scripts, you must have the latest major version of the relevant framework installed on the target computer.
    Important: To use this feature, the user must be authenticated with zero trust authentication, which serves the security of the session. Authentication is required only once when you run a Remote Execution step.

      1. On the Remote Execution page, select Create new job.

        Result: The Create job page is displayed.

      2. Choose the platform where you want to run automation steps.
      3. Add one of the following step to the list on the left:
        • PowerShell execution
        • JavaScript execution
        • Python execution
        • Shell script execution (available on Mac only)
      4. Paste your script to the field. You can also select files to upload that the remote devices can download.
        Note: You can reference the file(s) from the script. You can upload up to three files per job with a maximum size of 1GB each. Any file can be used.
      5. Click Next.
      6. From the list of Devices define the devices or a group of devices that will receive the script.
        You can organize your devices by selecting a grouping option from the top of the list.
      7. Click Next.
      8. Name the job in a way that is easy to remember later on.
        Optionally, you can schedule jobs up to seven days in advance. To do so, toggle Schedule this job and set the time and date for the job to run. In the Date and time field, either type a date or click the calendar icon to choose it from a date picker.
        Remember: Scheduled jobs run on each remote device's local time.
      9. Click Run.
        Note: A preset timeout pertains to both the job and the step.

        A timeout for every step is set to two hours, meaning that GoTo Resolve waits two hours for the script to finish on the remote computer. When the script finishes, GoTo Resolve starts the next step and waits another two hours for that step to finish. If a step does not finish on a remote computer in two hours, then it times out and the whole job fails.


    When you reference a file from the script, you only have to enter its name. Once the step ends, the file is deleted from the remote computer, unless it is copied somewhere else with the script.


    You upload 'a.txt' file for the job and you would like to copy it into a folder (also known as file distribution). Your script should look something like this:
    Copy-Item a.txt C:\Destination
    Article last updated: 21 July, 2022