Remote PowerShell / Bash Script Execution
PowerShell scripts can be executed:
With RMM Service management mode and 2FA enabled, you can run PowerShell scripts remotely from the Management Console on computers with RMM Agent installed.
RMM Agent script 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 is executed, the results of the previous command/script become unavailable
- 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:
- Open the Management Console.
- Open RMM > Computers.
- In the computer list, find the target computer, then click the diagram icon in the RMM column.

- As the computer info is loaded, switch to the Scripts and terminal tab.

- Select the tab to perform the required operation:
- Script Library. Select one of the predefined scripts or the scripts you have added from the RMM Script Library.
- Script Code. Select this option to type script code for remote computers.
- Upload File. Select this option to execute a PowerShell or Bash script on the selected remote computer from the selected file. Click + to upload the PowerShell script to the selected computers.
- Once the script is selected, created, or uploaded, click Execute.
- Confirm with 2FA.
- Wait until the script execution is complete to retrieve the result.
Note that PowerShell scripts are run by the 'System' account.
Script Library
You can select one of the predefined scripts or the scripts you have added from the RMM Script Library.

Select the script Category, then select the script in this category. Click Execute. Confirm the action with the Two-Factor Authentication verification code.
Click Last executed script result to see the result of the script execution. Note that some scripts take a while to complete.
Upload File
You can execute a PowerShell or Bash script on the selected remote computer from the selected file. Click + to upload the PowerShell script to the remote computer.

Drag and drop the script file to the upload area. Click Execute. Confirm the action with the Two-Factor Authentication verification code.
Click Last executed script result to see the result of the script execution. Note that some scripts take a while to complete.
Terminal
You can execute a PowerShell or Bash script on the selected remote computer in a terminal.

Confirm the action with the Two-Factor Authentication verification code.
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 or from the script library, proceed as follows:
- Open the Management Console.
- Open RMM > New Group Action Task.
- The RMM Group Action wizard starts.
- Select the PowerShell Script group action.

Click Next.
Select the computers to execute the script on.
Select a scope to apply the group action. You can apply the group action to all your companies, to specific companies, or to specific computers. You can exclude specified computers from the group action or use tags to apply the task to computers with the selected tags.
Any computer assigned one or more of the selected tags will be included in the task scope.

Note that group actions apply only to computers with the RMM Agent installed and Monitoring enabled. To apply these actions to other computers, install RMM Agent instances onto these computers first. You can select computers that are offline at the moment of selection. The action, in this case, will be applied as these computers come online. Click Apply to save your selection.
Click Next.
- Select the tab to enter the PowerShell script to execute:
- Script library. Select one of the predefined scripts or the scripts you have added from the RMM Script Library.
- Upload File. Select this option to execute a PowerShell or Bash script on the selected remote computer from the selected file. Click + to upload the PowerShell script to the remote computer.
- Terminal. Select this option to open the PowerShell Terminal for the remote computer.
Once the script is selected, click Next.
- Specify the schedule for the script execution. If you plan to run the execution manually, select the No schedule (run manually) option.

Click Next.
Note that if you select the 'No schedule' option, the started group action can be immediately applied to computers that are offline at the moment of the group task creation as they come online. Check whether the Run missed scheduled tasks immediately when computer starts up option is selected to perform it.
If required, set the schedule for the group action execution. You can set the following schedule options:
- Run once
- Specific date (once, daily, or monthly). You can create a recurring schedule. The recurring schedule can be used for a task that takes place on a regular basis (e.g., every Monday and Wednesday from October through December on specific weekdays and times).
When you specify the time for the group action execution, remember that the system time of the instance where the RMM Agent is installed will be used.
Note that PowerShell scripts are run by the 'System' account.
Once you complete configuring the new group action task, click Create. You will be prompted to confirm the task execution.

Confirm the group action according to the selected 2FA verification method.
If you selected the Run Once option, you will be provided with the report of the group task execution in real time.

You can view the results of the group task executions on the RMM > RMM Group Actions page.

Script Library
You can select one of the predefined scripts or the scripts you have added from the RMM Script Library.

Select the script Category, then select the script in this category.
By default, the script execution is tracked for 5 minutes to display the result of the script execution in the task. Some scripts take a while to be completed. You can change the tracking timeout, if necessary.
Script Code
You can type script code here to execute.

By default, the script execution is tracked for 5 minutes to display the result of the script execution in the task. Some scripts take a while to be completed. You can change the tracking timeout, if necessary.
Upload File
You can execute a PowerShell or Bash script on the selected remote computer from the selected file. Click + to upload the PowerShell script to the remote computer.

Drag and drop the script file to the upload area.
Manage Group Action Tasks and View Results
In the new main menu, click RMM > Group Action Tasks to see RMM group action task info.

To view the group task details, click the task name in the Task column.
The following actions are available:
- To run the task now, click the action menu to the right of the task to run, then click Run Now.
- To edit the task, click the action menu to the right of the task to change, then click Edit.
- To delete the task, click the action menu to the right of the task to delete, then click Remove.