The editor in Runbook Manager helps you write Runbooks faster with code completion and a searchable panel of the assets in your Automation Account.

Code completion

When you edit a PowerShell Runbook, the editor suggests cmdlet names as you type. The suggestions include all cmdlets imported from the modules in your Automation Account and the standard PowerShell commands. Standard PowerShell commands are labelled PowerShell.

Cmdlet suggestions

After a cmdlet and a space, type - to see the cmdlet’s parameters. Type more letters, for example -Api, to narrow the list. Each suggestion shows whether the parameter is required or optional. Hover over a suggestion to see its data type and parameter sets.

Select a suggestion to insert it. You can undo the insertion with Ctrl+Z / Cmd+Z.

Notice: Suggestions are based on the modules imported into ServiceNow. They do not guarantee that a cmdlet is available in the runtime environment your Runbook uses. Code completion is not available for Python Runbooks or in read-only mode.

If the suggestions cannot be loaded, click Retry suggestions. Your code is not affected.

The Editor tools panel

Click Editor tools in the editor to open the panel next to the code. Click Hide tools to close it again.

Editor tools

Select a Category and use Search assets to find what you need:

  • Cmdlets from the modules in your Automation Account.
  • Runbooks in the Automation Account, for example to start a child Runbook.
  • Variables, Credentials and Certificates in the Automation Account.
  • Templates grouped by category. Read more in Templates.

Expand an item to see the available commands, for example Get-AutomationVariable or Set-AutomationVariable for a variable. Click Insert to insert the command where your cursor is in the editor. If you have selected text, it is replaced.

The insertion is not saved until you click Save draft, and you can undo it.

Notice: The commands in the panel are PowerShell commands and are not offered for Python Runbooks. Templates are inserted as they are.

Results are loaded 30 at a time. Click Load more to see more, or narrow your search.

Create, modify and delete assets

Variables, credentials and certificates can be managed directly from the panel:

  • Click Create variable, Create credential or Create certificate at the top of the list to create a new asset in the Automation Account.
  • Expand an asset and click Modify to change it.
  • Expand an asset and click the trash icon next to Modify to delete it.

Modify an asset

Notice: Assets are shared by all Runbooks in the Automation Account. A change takes effect immediately in Azure, independently of the Runbook you have open.

Read more in Variables, Credentials and Certificates.