# Terminals

{% hint style="info" %}
Terminals require a [license](https://ironmansoftware.com/pricing/powershell-universal).
{% endhint %}

Terminals are in-browser PowerShell consoles that you can execute arbitrary commands within. Terminals are configured to target an environment that you select and can optionally us Run As credentials to run as other users. The history of terminals is maintained within the PowerShell Universal database. You can reconnect to disconnected terminals as long as they haven't timed out.&#x20;

{% hint style="info" %}
Terminal configurations are stored in `terminals.ps1`
{% endhint %}

## Configure A Terminal

You can configure a new terminal by navigating to Automation \ Terminals and clicking Create New Terminal. You'll be able to select the environment and credential to run the terminal as.&#x20;

![Terminals Page](/files/h90KrOqNT3qDTkQzr295)

## Use a Terminal

To use a terminal, click the Open Terminal button for the terminal you wish to launch. Depending on your configuration, this may start a new PowerShell process based on the environment you selected.&#x20;

![Open Terminal](/files/uW9ekalYI43GyU1CDmEo)

Once the terminal has launched, you'll be able to issue commands.&#x20;

![Run Commands in a Terminal](/files/aAv3UiTA6ZzxqFjedvYK)

### Stop a Terminal&#x20;

To stop a terminal, you can navigate to the terminal instances tab on the Terminals page. Click the trash can to stop the terminal.&#x20;

![Stop a Terminal](/files/6oNSPJBu9TUkUNwrT5Gg)

### Reconnect to a Terminal

If you navigate away from PowerShell Universal, the terminal will go idle. You can reconnect to a terminal by clicking the Open Terminal button for the idle terminal instance.&#x20;

![Reconnect to a Terminal](/files/iWFNmbZOUXfxZpqefLkX)

Terminals will time out automatically after 5 minutes. You can customize the timeout by setting the `-IdleTimeout` parameter of `New-PSUTerminal`.

## History

Terminal history can be enabled per terminal configuration.&#x20;

![](/files/UvnSJuHn9EHQMRpMgciC)

When terminal history is enabled, you will be able to view the history of all commands that were executed within the terminal. Click the View Command History button for the instance in question.

![](/files/KDI7DU8V6Ifaw4oSpsK8)

You will be able to review what the command was that ran, when it was ran, who started the terminal and what the output of the command was.&#x20;

![](/files/mZjrcRMCpKf081tzpohD)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powershelluniversal.com/v4-beta/automation/terminals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
