Skip to main content
All CollectionsDashboard and MSP Control PanelDashboard
Run scripts or install applications on devices - P9 Tasks feature
Run scripts or install applications on devices - P9 Tasks feature
IT-Man avatar
Written by IT-Man
Updated over 4 years ago

Table of contents

With Tasks you can instruct devices to install or uninstall applications such as Google Chrome, Adobe Reader, LibreOffice, etc. You can also write a PowerShell, Batch, Bash, Python, Ruby or Perl scripts and have devices run it. In short, with Tasks you've got the ability to remotely command devices to perform jobs from the comfort of your computer using the Panorama9 Dashboard.

To create a new Task navigate to the "Dashboard" -> "Tasks" and click on the "+ Add task". To run the Task, devices must have the Panorama9 Agent installed.

Tasks can be scheduled to run at a specific date and time. Or started instantly. Offline devices will receive the Task if they come online within 24 hours (you can also wake offline devices using the Wake-on-LAN feature).

Devices in different time zones will start the scheduled Task at the configured time. Meaning that if you configured a Task to start at 01:00 am, then when it is 01:00 am locally, the device will execute it.

Install an application

Panorama9 comes with a long list of applications you can choose to install. If you have a device where e.g. Google Chrome isn't installed, you can quickly install it by navigating to the device and click "Start task", set type to "Install" and select "Google Chrome" from the drop-down list.


If you want the installation to be done at a specific time, then schedule a new Task by navigating to "Tasks", click on "+ Add task", select Platform, set type to "Install", choose application and select devices or groups that should receive the application.

If you want to install software not found on the application drop-down list, you will have to use a script (see below).

Note: The device will download the required installer package over the Internet. Latest stable version of the application will be installed (unless otherwise stated). If it's a multi-language application, a language version matching the language of the underlaying OS is installed (e.g. if MS Windows is Italian, then an Italian version of the application is installed). Otherwise an English version is installed.

Pro-tip macOS: While we've included many of the most relevant applications there are many more you can choose from. The P9 Agent supports brew cask packages. To list all applications open a terminal and do "p9-brew cask search". If you find an application you wish to install then create a Bash script (see below) with the relevant code.

Uninstall an application

Applications can be uninstalled by selecting it and clicking on "Uninstall selected". You can uninstall it on a specific device or across your network.

To uninstall on a specific asset just navigate to the device, click the "Software (-Applications)" tab, select the application from the list and click"Uninstall selected".

To uninstall specific software across multiple devices select "Assets" -> "Software" and highlight an application to remove and then click "Uninstall selected".

Note: If the uninstall process requires a reboot, this is suppressed. For these types of uninstalls you must perform the reboot (you can use the Reboot device feature using the Panorama9 Dashboard).

Run a script

Before you can run a script you must create it under "Tasks" -> "Scripts repository". You can write code in any of the supported scripting languages. (Note that any console output generated at execution time by a device, will be recorded and can later be viewed from the "History" tab. Non zero exit code will result in the execution being marked as "Failed".)

Once you've saved a script to the repository, you can create a new Task and select the script. The Task can then be scheduled and set to run on one or more devices. You can also ask a specific device to instantly run the script. Just navigate to the device and click on "Start task" in the "Remote tools" box.

The script will be executed in the context of the P9 Agent service/daemon (on Windows "system" and on macOS "root", unless the P9 Agent is configured to run otherwise).
โ€‹

Scripts that can be run on Windows: Batch and Powershell

Scripts that can be run on macOS/OSX: Bash, Perl, Python and Ruby

Result of execution

Once the P9 Agent has completed a Task the result is returned and can be viewed in the Panorama9 Dashboard. Navigate to "Tasks" -> "History" and select a completed Task.

Each device that has run the Task is listed along with the result, duration and any console output.

Task result for each device can be:

  • Successful - completed with exit code zero

  • Failed - completed with a non zero exit code

  • Did not run - device didn't run a task (a Task has a maximum TTL of 24 hours)

The "Exit code" value can be viewed in the "Task output" box.

Did this answer your question?