Troubleshoot Scripts

Troubleshoot Scripts

Azure Runbooks Logs

Azure runbooks have enhanced logs that help you troubleshoot issues with scripted actions.

To view the Azure runbook logs:

  1. Navigate to Scripted ActionsAzure runbooks.

  2. At the bottom of the window, in the Scripted Actions Tasks section, locate the task with an Error in the Status column.

  3. Select Details.

    The Job Details window displays.

  4. Locate the entry in the log with an error.

  5. In the Output section, select any of the following:

    • Show: Select Show to display the standard Azure automation account runbook output.

    • Exception: Select Exception to display the exception's details.

Troubleshoot Azure Runbooks

Troubleshooting Azure Runbooks

Problem

Solution

Description

In some cases, a script fails to perform the scripted action, but its status is incorrectly set to Complete. This means that the PowerShell script failed to encounter fatal errors. The final output from the script presents information about the script but has no indication of an error.

  1. Navigate to the associated Automation account.

  2. View the log with the time stamp that matches the Nerdio Manager task log.

  3. Find and resolve the error that is produced by the script in your Nerdio Manager.

When running an Azure scripted action, the associated Automation account runs a specialized runbook, which copies the code directly from the Nerdio Manager and executes it. All scripts are executed as instances of the same Automation Account job. Here you can find the errors generated when running your script. The errors vary based on your script.

Troubleshoot Windows Scripts

For information about troubleshooting Windows scripts refer to Custom Script Windows - Troubleshoot and Support.

For more information about troubleshooting the custom script extension (CSE or CSExtension) refer to Custom Script Windows - Troubleshoot and Support for Extensions.

Tip: It is recommended that you use an isolated development session host and run the scripts directly on the host to test your scripts. This ensures that the PowerShell code is functional and preforms as desired. In addition, it provides quicker results than running the commands through Nerdio Manager.

Troubleshooting Windows Scripts

Problem

Solution

Description

Scripts that cause reboots fail the entire process. When the extension is waiting for the PowerShell script to complete fully (and if a reboot is started), the script fails.

For actions which require restarts and then additional actions:

  1. Split the script up into multiple scripts.

  2. Select the "Individual with restart" script execution mode.

  3. Place the rest of the scripts in order.

N/A

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Article is closed for comments.