Remote PowerShell Script Execution

With enabled RMM Service management mode and 2FA, you can run PowerShell scripts remotely from Management Console on computers with RMM Agent installed.

As of Management Console 5.6 and RMM Agent 1.2, the following script execution features are supported:

  • Exit codes
  • Script errors displayed
  • Copy and paste
  • Script interruption

RMM Agent Powershell execution has some limitations:

  • PowerShell version 5.0 or later is recommended. PowerShell version 4.5 can be used, but with restrictions:
    • Once a command or script are executed, results of the previous command/script are not available
  • Interactive PowerShell scripts are not supported
  • Two-factor authentication must be enabled in your account

Run PowerShell Scripts on Remote Computer

To use a PowerShell console or to upload a PowerShell script to execute on a remote computer, proceed as follows:

  1. Open the Management Console.
  2. On Computers select Remote Management if you use legacy main menu, or open RMM > Computers page in the new main menu.
  3. In the computer list, find the target computer, then in the RMM column click the diagram icon.

  1. As the computer info is loaded, switch to the PowerShell tab.

  2. Enter the 2FA code.

  3. Enter the command or click + to upload the PowerShell script to the remote computer.

  4. Once the script is uploaded, click Execute.

Run PowerShell Scripts on Multiple Computers

You can run PowerShell scripts remotely on multiple computers with the RMM Agent installed.

To run PowerShell scripts on multiple computers from a file, proceed as follows:

  1. Open the Management Console.
  2. In the Computers menu, select Remote Management.
  3. Click Group Actions and select RMM Group Actions. RMM Group Action wizard starts.

  1. On the Select step, select computers to run the PowerShell script on. Click Next.

  1. Specify the 2FA code.

  1. Select the Execute PowerShell from file or PowerShell Terminal.

  1. Click + to upload the PowerShell script or type the command in the console.

The uploaded script appears in the script area:

  1. Once the PowerShell script is uploaded, click Execute.
  2. Monitor the progress on the Result step.

  1. Check the script execution results.

In case the script cannot be executed on some computer, you will be notified with a failure reason:

  1. Click the Download result link to download the CSV file with the script execution results.

Note that PowerShell scripts are run by the 'System' account