--- title: Create input variables description: Create the variables to pass into the activity in the Inputs form of the activity designer.After you create the input variables, map them to the fields in the Execution Command form.Use the input variables you created to configure the command that Orchestration executes on the Windows target machine.You can test the input parameters of a custom activity during its development without having to run the activity in a workflow context. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/servicenow-platform/orchestration/CreateInputVariables.html release: australia product: Orchestration classification: orchestration topic_type: task last_updated: "2026-03-12" reading_time_minutes: 7 breadcrumb: [Create custom activities using custom activity designer templates, Orchestration activity designer, Classic Orchestration, ServiceNow AI Platform Additional Capabilities, Extend ServiceNow AI Platform capabilities] --- # Create input variables Create the variables to pass into the activity in the **Inputs** form of the activity designer. ## Before you begin You must name your activity in the **General** form before you can advance to the **Inputs** stage. Roles required: workflow\_admin or activity\_creator **Note:** Variable strings in the **Inputs** form have a 255 character limit. ## Procedure 1. Click the **+** icon to create a new input variable. The designer creates a default variable called **Input1**. \[Omitted image "InputsNewVariable.png"\] Alt text: Creating an input variable 2. Type your new variable name in the field. 3. To change the name of a variable or any of its attributes, double-click the value and then select or enter a new value in the field that appears. 4. Configure your variable using these fields: |Field|Description| |-----|-----------| |Type|Data type for this variable. Double-click on the field to display the choice list. In addition to the usual data types, you can create input arrays and encrypt individual variables that contain sensitive data. Encrypted variables are passed to the ECC Queue and then decrypted by the MID Server when they run on the target host. Sensitive data returned from running these variables on the host can then be passed to another activity through encrypted output variables.| |Mandatory|Marks an input variable as mandatory. Variables marked as mandatory are required fields in the properties form for the activity in the workflow. The input testing feature allows you to filter on mandatory variables.| |Default|Default value for this input variable. Default values are prepopulated for variables in the properties form for the activity in the workflow. You can override this value when you test the variables.| 5. To reorder the variable list, select a row and then drag the row to its new location. When you select a row to move it, the pointer icon changes to an up/down arrow icon \(\[Omitted image "MoveVariable.png"\] Alt text: up/down arrow icon\). 6. To delete a variable, click the delete icon \(\[Omitted image "DeleteVar.png"\] Alt text: delete icon\) in the row. 7. Click **Continue** to advance to the **Execution Command** stage or click **Go to Pre-Processing \(Advanced\)** to create a script that runs before the activity executes. **Parent Topic:**[Create custom activities using custom activity designer templates](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/create-custom-activities.md) ## Map an input variable After you create the input variables, map them to the fields in the Execution Command form. ### Before you begin Role required: activity\_admin, activity\_creator ### About this task These fields contain values required by the target host or endpoint to authenticate and query for data. Included in this example are fields for a command to run on the target and the MID Server to use, if one is required. ### Procedure 1. To map a variable, drag it into the appropriate field. The designer automatically expresses the variable in the syntax the system requires. \[Omitted image "InputsMapping.png"\] Alt text: Mapping input variables ## Configure the PowerShell execution command Use the input variables you created to configure the command that Orchestration executes on the Windows target machine. ### Before you begin Create the input variables you need in the **Inputs** form before you can advance to the **Execution Command** stage. Role required: activity\_creator, admin **Note:** You can test the PowerShell connection between the MID Server and the target computer without having to run the acvitity in a workflow context. For details, see [test template outputs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md). ### Procedure 1. Drag variables from the list of inputs and drop them into command fields. The system formats the variable in the proper syntax for the command. \[Omitted image "PowershellExecutionCommand.png"\] Alt text: PowerShell execution command 2. Complete the fields shown in the table.
| Field | Description |
|---|---|
| Input | Input variable builder. [Create variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md) to [map](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md) to available fields. |
| Target host | Host name or IP address of the target server for this PowerShell activity. |
| Script type | Type of script to run on the PowerShell host. Available options are:- Custom Powershell command - MID Server script file |
| MID Server script file | MID Server script file to run. This field is available when the **Script type** selected is MID Server script file. |
| Command | Command that this activity runs on the target host. This field is available when the **Script type** selected is Custom Powershell command. You can drag and drop input variables from the variable builder into this field to create your command. |
| Powershell variables | Name-value pairs to pass to the host with Powershell. You can create these variables manually, or drag input variables into the **Value** field. Encrypted input variables retain their encryption, regardless of the data type settings in this field. If you type in a value and select the **Encrypted** data type, your value appears in plain text in this field and is only encrypted when it passes to the ECC Queue. |
| Use MID service account | Forces this activity to authenticate on the target host using the credentials of the MID Server service account only, without trying any other credentials. When this check box is selected, the **Credential tag** field is not available. |
| Credential tag | Specific [Credential aliases for Orchestration activities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/c_AssignCredsOrchActivities.md) this activity must use to run Powershell commands on the host. If this field is left blank, the MID Server tries all the available credentials until it finds a valid one, ending with the MID Server service account. If a credential alias is defined, the MID Server tries the credentials for that alias only and does not try the MID Server service account. This field is not available when the **Use MID service account** check box is selected. |
| Required MID Server capabilities | MID Server to use for querying Powershell, by capabilities. By default, the system selects a Powershell MID Server. |