> For the complete documentation index, see [llms.txt](https://documentation.2pintsoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.2pintsoftware.com/deployr/automation-and-powershell/scripting-for-deployr-server/step-definitions-metadata.md).

# Step Definitions - Metadata

DeployR stores step definitions in the database as JSON blobs. When you examine the JSON and compare it with the step in the console, the structure becomes clear. Step definitions contain several nested layers of information.

```
Get-DeployRMetadata -Type StepDefinition
```

### Metadata Properties

* **id**: Unique DeployR ID (GUID) created when the item is created.
  * Built-in items typically have pre-assigned IDs that start with 00000000
* **name**: The friendly name displayed for the item in the console
* **description**: Optional field for additional information
* **typeName**: A property that you can set as needed; it can be useful for organizing automation
* **versions**: this is a JSON blob that contains additional details about the individual version, of which there can be many per item. This will look different depending on the purpose of the item. See the detailed areas to dig in more.
* **versionCount**: the count of versions associated with an item
* **createdDate**: The date the item was originally created in DeployR
* **lastModifiedDate**: the date the item was last modified by a user or process
* **readOnly**: \[True / False] lets you know if you can modify the item. Built-in items are set to True.

**Version details**:

* **id**: a unique GUID created for each version
* **stepDefinitionId**: the GUID of the parent step definition.
* **versionNo**: the version number
* **status**: the current status of that version (In Development, Active, Deprecated)
* **description**: an optional property that you can provide additional information
* **options**: the options in the step (see below)
* **validators**
* **createdDate**: date the version was created
* **lastModifiedDate**: date of the last modification to the version

**Options Deeper Dive. This metadata will comprise all of the different options in the step**

* name: name of the option you are setting, completely custom string
  * if the option is for a script, use: scriptName
  * if the option is for a content item with your scripts, use: content
* displayName: Friendly Name shown in console
* description: a description of what is going on with this option, shows up in the "Hover Over"
* defaultValue: the default value for the option, will be different based on the option type
* type: the type of option
  * Text
  * Large text
  * Boolean
  * Script
  * Content
  * Content list
  * Dropdown
  * Task sequence
* contentItemPurpose: Filter for when using a content option
* hidden: True/False, will this option be shown in console? Often scripts and related content items are set to hidden True, so they do not show up.
* validations: is there a regex validation associated with the option?
* dropdownOptions: the values for a drop-down list

Here is a step definition in PowerShell:

```
$Steps = (Get-DeployRMetadata -Type StepDefinition | Where-Object {$_.id -notlike '0000*'})
$Steps | Select-Object -Last 1
($Steps | Select-Object -Last 1).versions
```

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/zRRZMYyJhjkcvXfYUq4i/image.png" alt=""><figcaption></figcaption></figure>

This step definition is for advanced formatting of a disk. Here are its options:

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/x5FYoACfGhZkTleCrII9/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/yV0olaAPG3LZd1z1b0IP/image.png" alt=""><figcaption></figcaption></figure>

This step definition has several types leveraged to assist the user in determining which options they want to leverage. It also uses a script: Format-Disk.ps1, which is located in the content item d819ff51-72a1-4e3c-bdf3-fcb69cf1bbab:1 . When this step is triggered in the task sequence, it downloads that content item and runs the Format-Disk script with the parameters set in the step. Here is the step in the console:

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/q2RpjwmJBhYzR6gG7KuX/image.png" alt=""><figcaption></figcaption></figure>

And here it is after it is added to a task sequence:

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/t0h3z9QcMfX40S1EoIrP/image.png" alt=""><figcaption></figcaption></figure>

For reference, here is a blank option when you are adding a new one into a definition.

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/o5RPC8t4CBLEBEV1h9YM/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/PYKpuqVLf7tdPjndVTNq/image.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.2pintsoftware.com/deployr/automation-and-powershell/scripting-for-deployr-server/step-definitions-metadata.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
