NinjaOne's Command Line Interface (CLI) is a robust tool, allowing you much of the same functionality and visual properties as if you were running cmd.exe on Windows (or Terminal on macOS). We also have the ability to launch PowerShell remotely on Windows devices!
To learn more about the ninjarmm-cli component for Windows, Mac, and Linux devices and interacting with custom fields, please see Custom Fields and Documentation: CLI and Scripting.
Table of contents:
- Grant CLI permissions to a Technician
- Launch CLI or PowerShell on a Windows Device
- Launch CLI (Terminal) on a Mac/Linux Device
- Additional Terminal Launch Options
Grant CLI permissions to a Technician:
System Administrators have access to the CLI by default. For other technician roles, or technicians without roles, the CLI permissions must be enabled manually:
- Click Administration in the left navigation pane and select Accounts. Click on a technician's name to edit their account.
- Open the Devices tab and select the Remote Tools permission.
- Click the check-box next to "Command Line" to enable.

- Click Save Changes to confirm.
Please see User Permissions: Permission Options for more information.
Launch CLI or PowerShell on a Windows Device:
- Navigate to the device whose CLI you'd like to access, and then hover your cursor over the remote CLI icon
to the right of the device name.
- You can then choose whether you'd like to launch Cmd.exe or Powershell, and can launch either one as System (which runs as localsystem user) or the current Logged in user. There are additional options to launch the connection in either 32 bit or 64 bit mode.Important Note: You will need to ensure that PowerShell is installed locally on the machine in order to launch PowerShell from Ninja. If your machine does not have PowerShell installed, you will receive an error when attempting to connect.
Windows CLI Utility Overview
We have included some helpful tools buttons in the upper, right-hand corner of the CLI utility.
- Keyboard icon — allows you to send the "Ctrl+C" command to terminate the current action.
- Disk icon — allows you to download Terminal contents to a txt file.
- Duplicate icon — allows you to copy the contents to clipboard.
- "X" icon — terminates cmd.exe on the node.
| Highlighting any text in the CLI utility automatically copies to the clipboard! |
As of our 4.4 release, our CLI tool includes the following new functionalities:
- Run any interactive shell (if it is installed on the PC), such as cmd.exe, powershell.exe (or pwsh.exe), bash.exe, psql.exe, python.exe and others.
- Execute scripts inside shells:
- Copy and paste scripts to powershell.exe, bash.exe, or python.exe.
- Copy and paste SQL to psql.exe.
- Run and use WSL (Windows for Linux subsystem) for access to Linux distribution installed under Windows.
- Use Chocolatey for installing and uninstalling software on PC.
- Work with all shells in full interactive mode with all events and pseudo GUI, like:
- Run and display Far Manager.
- Use Ctrl+C to stop execution of the current task.
- Use Shift+Ctrl+C to copy.
- Use Shift+Ctrl+V to paste.
- Use mouse clicks, mouse scroll, up/down keys, hotkeys F1-F10 for Far Manager and other pseudo-GUI apps.
Please note the following when using the CLI:
- While running Cmd.exe as System, SFC commands will not resolve on a user level (we do include a sfc /scannow command in our native scripts).
- To use a curl command, you must use the -O flag (i.e. "curl -O https://url.zip").
- To use wget, use the '--no-check-certificate --progress=bar:force' (without quotes) parameter at the end of your URL.
(i.e. wget https://url/somefile.zip --no-check-certificate --progress=bar:force)
Launch CLI (Terminal) on a Mac/Linux Device:
- You can launch the remote terminal for Mac utilizing the same method as a Windows device in the Ninja dashboard. Navigate to the device whose CLI you'd like to access, and then hover your cursor over the remote CLI icon
to the right of the device name.
- Choose whether to launch Terminal, or Terminal as Root.
Mac/Linux Terminal Utility Overview:
Mac:
Linux:
View helpful tools buttons in the top right corner of the CLI utility window.
- Keyboard icon — allows you to send the "Ctrl+C" command to terminate the current action.
- Disk icon — allows you to download Terminal contents to a txt file.
- Duplicate icon — allows you to copy the contents to clipboard.
- "X" icon — terminates cmd.exe on the node.
Additional Terminal Launch Options:
Launch the CLI/Terminal from Search
To launch the CLI/Terminal from a global search, enter the name of the device into the top search bar on the console and hover your cursor over the play button icon. Then, hover over Remote Tools and choose the type of CLI/Terminal session to launch.

Launch the CLI/Terminal from the Organization Dashboard
To launch the CLI/Terminal from the organization dashboard, find the device listed in the list on the Overview tab of the organization dashboard and hover your cursor over the play icon button. Then, hover over Remote Tools and choose the type of CLI/Terminal session to launch.

Launch the CLI/Terminal Session in a Separate Tab
- Begin the process of initiating a CLI/Terminal session using any of the methods outlined above.
- When selecting the type of session to establish, click the
icon instead of the text.

The session is launched in a new tab, allowing for multiple concurrent sessions on different devices.
For a list of frequently asked questions about CLI, please see Command Line Interface (CLI): FAQ.








