Skip to content
RevoDocs

Scripts

Write PowerShell, Bash and sh scripts with typed parameters, approve each version once with a passkey, and run them on devices with guardrails.

Updated

On this page

Scripts (in the RMM group of the sidebar) is your workspace's script library. Each script has versions; devices run a version only after someone approved it with a passkey, and the agent checks that approval itself before it runs anything. Nobody, including Revo, can run a script on your devices without one of your approvers' passkeys.

Scripts need agent 0.10 or later and RevoRMM on for the customer.

Approver passkeys

Set these up first, in Settings → Scripts. Owners and admins can approve scripts.

  1. Click Add passkey, name it and confirm with your two-factor code.
  2. Your browser asks for a security key, fingerprint, face or PIN.

The workspace's first passkey is trusted at once: devices pin it the next time they check in. Every passkey after that waits for an endorsement: an approver whose passkey devices already trust clicks Endorse and signs the new list. This way nobody can add an approver behind your back, not even someone with access to the server.

Removing a passkey needs no endorsement. Versions approved only with that passkey stop running and need approving again.

Write a script

Click New script, name it and pick the language (PowerShell for Windows, Bash or sh for Linux and macOS). Then write the first version:

  • Parameters are typed: text (with a length limit and an optional pattern), whole numbers (with a range), yes or no, and one of a list. The person running the script fills them in; the device checks them again before it runs.
  • Each parameter reaches the script as an environment variable named REVO_ARG_<NAME> ($env:REVO_ARG_PRINTER in PowerShell, "$REVO_ARG_PRINTER" in Bash). Values never become part of the script text, so they can't inject commands.
  • Stop it after sets the time limit; the device stops the script and everything it started.
  • Only for some customers limits where the version may run. Approval ends makes the approval expire.

A saved version can't be edited: change something by saving a new version.

Where scripts run:

  • Windows: as SYSTEM, with the usual system variables ($env:ProgramFiles, $env:windir and so on).
  • Linux: as root, but inside the agent's own sandbox: a script can read the system and run commands, but can't install packages or change files outside the agent's directories. Scripts that need to change the system are planned.
  • Everywhere: in a private temporary folder that is deleted afterwards. Wait for anything the script starts: when the script ends, everything it started is stopped.

Install software from the catalogue

Software catalogue on the Scripts page lists common Windows applications (browsers, Adobe Reader, 7-Zip, Zoom, Teams…). Pick Install or Uninstall, or add any other winget package by its id. Revo writes a PowerShell script that runs winget for that one package, machine-wide, from the winget community source. It's an ordinary script: approve it once with your passkey, then run it on devices, and read each device's output. Windows only; devices need winget (App Installer), which current Windows 10 and 11 have.

Approve a version

A new version shows Needs approval. Click Approve, read the script, and click Approve with passkey. Your passkey signs this exact script, its parameters, time limit and customer scope.

Run a script

Click Run on the script, pick the version, the devices and the arguments, and add a reason (a ticket number, for example). Devices that can't run it are greyed out with the reason. Offline devices run it when they next check in (within four hours).

Guardrails instead of approval queues:

  • From 10 devices, type the script's name to confirm.
  • Technicians run a script on up to 25 devices at a time; owners and admins up to 500.
  • Pause scripts in Settings → Scripts stops every new run at once. Anyone who runs scripts can pause; only owners and admins resume.
  • Unusually many runs in an hour (more than 1,000 devices) pause scripts automatically and alert the owners.

Results

Runs on the script lists every run with how many devices succeeded, failed or were skipped. Click a run, then a device, to read what the script printed (output and errors, up to 256 KiB each) and its exit code.