Azure tech-specific script execution

Run remote scripts on Azure servers using Azure Run Command without a username and password

Tech-specific script execution lets Cloud Management Platform (CMP) run remote scripts on an Azure VM it cannot reach directly over SSH or WinRM. CMP uses the Azure Run Command feature, so Azure delivers the script to the VM and reports the result back.

Prerequisites

  • An Azure resource handler with an environment.
  • An Azure account with the VMs you intend to run scripts on.

Azure imposes its own limits on what Run Command can do. See the Microsoft documentation for running PowerShell scripts on a Windows VM and shell scripts on a Linux VM, particularly the listed restrictions.

Add the parameter to a group or environment

  1. Open the group or environment associated with the Azure resource handler.

  2. On the Parameters tab, select Add.

  3. Find Use Tech-Specific Script Execution and add it.

    Screenshot of the Add parameter form. (opens full-size image in a new tab)

  4. Select the parameter you just added.

  5. Check that Show on Objects and Available to all servers are enabled.

Add the parameter to a blueprint

This step is optional. As long as the parameter is available to the group or environment, it appears on the order form without being set on the blueprint.

  1. Open Catalog and select the blueprint.
  2. Open the Parameters tab.
  3. Add Use Tech-Specific Script Execution.

Provision and test

  1. Provision a server from a blueprint, and select Use Tech-Specific Script Execution on the order form. The parameter appears on the order form as long as it is available to the group or environment.
  2. On the provisioned server, run an ad hoc script.

The script should run without asking for a username and password. When tech-specific execution is correctly enabled, the username and password fields do not appear on the ad hoc script form at all, which is the quickest way to confirm it is working.