Submit a request

Nerdio Help Center

Scripted Actions: Azure runbooks in NMM

Applies to: Nerdio Manager for MSP (NMM) v2.0.1+


Azure Runbook scripted actions are run via an Automation Account in Azure. This enables automated actions of Azure Resources outside of the VM. 

Use-Case for Azure Runbook

For some automations, the necessary actions to take must be done in the context of Azure, outside of the VM itself. While these commands could be run on the VM with the Azure PowerShell module installed, running scripts on session hosts that target Azure are less efficient and can be unreliable. Azure Automation allows for consistent execution, and allows for the NMM-App to run the scripts as itself easily. Some scripts even require the VM to be restarted or shut down, which means it could not be run on the session VM regardless.

Enable Azure Runbooks

In order to execute PowerShell in Azure, a new automation account must be made for the NMM app to use. Because this creates new Azure resources, we have made the Azure Runbooks feature require manual activation for existing accounts. Starting in v2.1, all new accounts will have Azure runbooks enabled by default.

  1. Log in to NMM portal, navigate to Settings -> Environment:Settings_Environment_Runbooks.png
  2. Go to Azure runbooks scripted actions and make sure current status is set to "Enabled"
  3. If the status is disabled, click "Disabled" hyperlink. Toggle the switch to "On" and wait for the creation process
  4. From the main menu, navigate to Scripted Actions->Azure Runbooks. You can search runbooks by name, description or tags:Azure_runbooks.png
  5. Now let's explore all options to manage Azure runbooks. Select an existing Azure runbook and expand the "View" dropdown next to it:Azure_runbooks_view_drop_down_expanded.png


You can search Azure runbooks either by description or by tags. You can also run a search on the basis of their "Execution mode" by either checking "Individual" or "Combined" checkbox options as shown below:



The "View" option enables you to see details on an existing runbook such as name, description, tags, script execution mode, script execution environment, and the script:


Assign accounts

You can assign accounts to a selected scripted action using "Assign accounts" option. You can either assign all accounts or selected accounts to a specific scripted action as shown below:


Run now

You can run Azure runbook scripted action using "Run now" option. You need to specify "add parameters" or "variable names" that will be passed to the selected scripted action. Expand the "Advanced settings" option to specify AD credentials and execution timeout. Click "OK" button when done:



You can schedule to run an Azure scripted action at a later date/time using the "Schedule" option. You need to specify:

  • "Add parameters" or "variable names" that will be passed to the selected scripted action
  • Expand the "Advanced settings" option to specify AD credentials and execution timeout
  • Specify start date, timezone, start time and the frequency of script execution using "Repeat" dropdown
  • Click "OK" button when done:



You can clone an existing scripted action using "Clone" option. You need to specify:

  • Name of the scripted action
  • Description
  • Tags
  • Script execution mode and
  • Script execution environment
  • You will be able to view the scripts in the textbox as shown below.
  • Click "Clone" button to confirm action on the scripted action.



You can update a selected scripted action using "Edit" option. The name, description and tags for the scripted action will be auto-filled. You need to select the script execution mode,script execution environment from the drop-down. You will be able to view the scripts in the textbox as shown below. Click "OK" button to confirm edit action on the scripted action.



You can delete a selected scripted action using "Delete" option. Select "OK" button on the confirmation pop-up to confirm deletion:



Add scripted action

Click "Add scripted action" button enables you to add a new scripted action on NMM. You will need to provide name, description, tags, select execution mode from the drop-down. Click "OK" button to add the scripted action as shown below:


View scripted action tasks

You can view the status of scripted actions under "Scripted action tasks" section. You can search tasks by any text in the tasks or filter tasks by status (ALL STATUSES, PENDING, IN PROGRESS, COMPLETE, ERROR and CANCELLED). You can refresh tasks and also download them in JSON format:


To view more details for a scripted actions task, simply click "Details" option on the task:


You can even hide a scripted action task by clicking on "Hide" option.


Related KB articles:

GitHub integration in NMM


Was this article helpful?
0 out of 0 found this helpful
Important Notification for NFA Partners Only
  • Microsoft is sunsetting Azure Classic (not Azure Virtual Desktop (AVD)) - Microsoft Article
  • NFA sunset occurs February 20th, 2023
  • NFA will be fully supported until the official sunset -


Please sign in to leave a comment.