> 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/reference/task-sequence-variables.md).

# Task Sequence variables

You can use DeployR task sequence variables in step definitions, conditions, and other task sequence operations. Task sequence variables that start with an underscore ("\_") are read-only variables and cannot be set.

For examples of creating and using task sequence variables with PowerShell, see **Scripting for OSD** in the **Automation & PowerShell** section.

The variables below are created in different ways. Some are generated by the DeployR Gather script, which runs before the task sequence starts; example values for these variables are included in their descriptions. Others are created by the DeployR task sequence as it gathers information about the deployment environment. Other variables can be used to control settings or task sequence behavior, such as `PEERING` or `FINISHACTION`.

For the variables that control downloads, proxy servers, and BranchCache peering, see [Download and peering variables](/deployr/reference/task-sequence-variables/download-and-peering-variables.md).

{% hint style="warning" %}
DeployR 1.4 renamed some read-only path variables: `DEPLOYRCONTENT` is now `_DEPLOYRCONTENT`, `DEPLOYRSTATE` is now `_DEPLOYRSTATE`, and `_DEPLOYRLOGS` is now `_DEPLOYRLOGPATH`. Update any scripts that use the old names. The `_UIPORT`, `_UISOCKET`, and `_UITSLIST` variables are no longer used.
{% endhint %}

On Hyper-V virtual machines, the Gather process also turns key-value pair (KVP) data from the host into variables: `PHYSICALHOSTNAME`, `VIRTUALMACHINEID`, and `VIRTUALMACHINENAME`, plus one variable for each value an administrator has added to the VM's external KVP pool on the host. Starting with DeployR 1.4, this also works in Windows PE, so you can, for example, pass a computer name from the Hyper-V host to a bare metal deployment.

### Task Sequence Variable List

<table><thead><tr><th width="251.800048828125">Variable</th><th width="322.400146484375">Description</th><th>Options</th></tr></thead><tbody><tr><td>_DEPLOYRCONTENT</td><td>X:\_2P\content</td><td>Set by DeployR</td></tr><tr><td>_DEPLOYRDEBUGLOGGING</td><td>TRUE when the DeployR client is writing debug-level log entries</td><td>Set by DeployR</td></tr><tr><td>_DEPLOYRLOGPATH</td><td>DeployR log location<br>Example Value: X:\_2P\logs</td><td>Set by DeployR</td></tr><tr><td>_DEPLOYRSTATE</td><td>X:\_2P\state</td><td>Set by DeployR</td></tr><tr><td>_ENCRYPT</td><td>true</td><td>Set by DeployR</td></tr><tr><td>_LASTACTIONSUCCEEDED</td><td>TRUE/FALSE</td><td>Set by step at the end of step</td></tr><tr><td>_LASTACTIONRETURNCODE</td><td>0 (Success) or another Number</td><td>Set by step at the end of step</td></tr><tr><td>_SEQUENCESTATE</td><td>Current task sequence state<br>Example Value: {"f4b57e76-184a-47c4-8631-eae8cf7f4f8d":"Success","ba87d732-5df3-44c2-a98b-258123f62370":"InProgress"}</td><td>Set by DeployR</td></tr><tr><td>_SMSTSLOGPATH</td><td>X:\Windows\TEMP</td><td>Set by DeployR</td></tr><tr><td>_STIFLERAGENTID, _STIFLERNETWORKID, _STIFLERMOMSERVERS, ...</td><td>StifleR client settings, such as the network ID, MOM servers, and bandwidth limits, read from the registry when the StifleR client is running. See <a href="/deployr/reference/task-sequence-variables/download-and-peering-variables.md">Download and peering variables</a></td><td>Set by DeployR</td></tr><tr><td>_TSIDENTIFIER</td><td>6f40f996-8db5-49f3-b8ca-8671ea9edf5a</td><td>Set by DeployR</td></tr><tr><td>_UITSDEBUG</td><td>TRUE/FALSE</td><td>Set by running in Debug mode</td></tr><tr><td>_VARIABLEPORT</td><td>7282</td><td>Set by DeployR</td></tr><tr><td>_VARIABLESOCKET</td><td>X:\_2P\state\variables.socket</td><td>Set by DeployR</td></tr><tr><td>ANONYMOUS</td><td>TRUE</td><td>Set by DeployR</td></tr><tr><td>ARCHITECTURE</td><td>x64</td><td>Set by DeployR Gather</td></tr><tr><td>ASSETTAG</td><td>4102-7492-9856-5816-5097-6344-26</td><td>Set by DeployR Gather</td></tr><tr><td>BASEBOARDPRODUCT</td><td>Virtual Machine</td><td>Set by DeployR Gather</td></tr><tr><td>CHASSIS</td><td>Desktop</td><td>Set by DeployR Gather</td></tr><tr><td>CSPVERSION</td><td>Hyper-V UEFI Release v4.1</td><td>Set by DeployR Gather</td></tr><tr><td>CUSTOMWEBURL</td><td>URL of a custom web page to show before the task sequence starts. The values the page posts back become task sequence variables. Variables in the URL, such as %ModelAlias%, are replaced first. See <a href="/deployr/customization/custom-web-prompt.md">Custom web prompt</a><br>Example: https://web.contoso.com/prompt.html</td><td>Set by Admin in the bootstrap.json</td></tr><tr><td>DEBUG</td><td>TRUE/FALSE</td><td>Set by BootStrap Config</td></tr><tr><td>DEFAULTGATEWAY001</td><td>192.168.10.1</td><td>Set by DeployR Gather</td></tr><tr><td>DEPLOYR_PROCESS</td><td>This is set to the process ID of the parent DeployR client shell process. By itself that is not useful. However, PSADT (4.2 and above) will look for this value so that wrapped app installers will behave as expected when run inside a DeployR task sequence (thanks to Dan Cunningham).</td><td>This will be set by the DeployR client shell and can be seen in any task sequence step.</td></tr><tr><td>DEPLOYRAPIURL</td><td>URL of the 2Pint cloud service used for the cloud OS and driver pack catalogs. Default https://api.service.2pintsoftware.com. Normally not set; change it only when 2Pint Software support tells you to</td><td>Set by Admin in the bootstrap.json</td></tr><tr><td>DEPLOYRAUTHCERTIFICATEISSUER</td><td>The issuer that client authentication certificates must have when using certificate authentication</td><td>Set by DeployR from the server configuration</td></tr><tr><td>DEPLOYRAUTHDEVICEFLOW</td><td>TRUE/FALSE</td><td>Set by DeployR</td></tr><tr><td>DEPLOYRAUTHWINDOWSAUTHENTICATION</td><td>TRUE/FALSE</td><td>Set by DeployR</td></tr><tr><td>DEPLOYRCLIENTVERSION</td><td>The DeployR client version currently running in the task sequence, which was included in the boot media.</td><td>Set by DeployR</td></tr><tr><td>DEPLOYRHOST</td><td>https://deployr.corp.viamonstra.com:7281</td><td>Set by DeployR</td></tr><tr><td>DEPLOYRPOWERPLAN</td><td>GUID of the power plan to restore when the task sequence ends. DeployR saves the active plan here, then switches to the High performance plan while the task sequence runs. If the variable is already set, its value is kept, so you can set it to choose the plan that is active after the task sequence.</td><td>Set by DeployR, or set by Admin to override</td></tr><tr><td>DEPLOYRPROXY</td><td>URL to your Proxy Server &#x26; Port EX: https://contoso-mgmt.contosomn.com:8089</td><td>Set by Admin in the bootstrap.json<br>"DeployRProxy": "https://contoso-mgmt.contosomn.com:8089"</td></tr><tr><td>DEPLOYRPROXYBYPASS</td><td>FQDNs of the URLs to Bypass EX:<br>"contosomn.com, 2pintlabs.com"</td><td>Set by Admin in the bootstrap.json<br>"DeployRProxyBypass": "contosomn.com, 2pintlabs.com"</td></tr><tr><td>DEPLOYRROOT</td><td>X:\_2P</td><td>Set by DeployR</td></tr><tr><td>DEPLOYRSERVERTYPE</td><td>Enterprise or Community, depending on the license of the DeployR server</td><td>Set by DeployR after connecting to the server</td></tr><tr><td>DEPLOYRSERVERVERSION</td><td>The DeployR server version, the client version and server version should match, if not, regenerate the boot media.</td><td>Set by DeployR</td></tr><tr><td>DEPLOYRTASKSEQUENCEID</td><td>00000002-0000-0000-0000-000000000001</td><td>Set by DeployR once TS selected</td></tr><tr><td>DEPLOYRTASKSEQUENCENAME</td><td>Name of the TS currently running</td><td>Set by DeployR once TS selected</td></tr><tr><td>DEPLOYRTASKSEQUENCEVERSIONID</td><td>8fd68264-2d37-4000-55ab-08dca0511f05</td><td>Set by DeployR once TS selected</td></tr><tr><td>DEPLOYRTASKSEQUENCEVERSIONNO</td><td>1</td><td>Set by DeployR once TS selected</td></tr><tr><td>DEPLOYRTOKEN</td><td>String of the Token used for communications</td><td>Set by DeployR after Auth of the TS</td></tr><tr><td>DEPLOYRUSER</td><td>User or Method for Auth of the TS</td><td>Set by DeployR after Auth of the TS</td></tr><tr><td>DEPLOYRUSERROLE</td><td>When using Entra, a role will be associated with the user</td><td>Set by DeployR after Auth of the TS</td></tr><tr><td>DEPLOYRUSERROLES001</td><td>Several roles can be assigned to a user; they are listed here</td><td>Set by DeployR after Auth of the TS</td></tr><tr><td>DEPLOYRWEBSERVICETIMEOUT</td><td>Timeout in seconds for REST calls to the DeployR server. Default 300</td><td>Set by Admin in the bootstrap.json</td></tr><tr><td>DEVELOPMENTMODE</td><td>TRUE/FALSE</td><td>Set by running in Dev mode</td></tr><tr><td>DISK<em>n</em>SECTORSIZE</td><td>Logical sector size of disk <em>n</em>, for example DISK0SECTORSIZE = 512 or 4096. Used to pick the matching FFU image</td><td>Set by step: Detect disk sector size</td></tr><tr><td>DOMAIN</td><td>Default domain for Windows authentication. When set, the domain is filled in so the user only needs to enter a user name and password<br>Example: CONTOSO</td><td>Set by Admin in the bootstrap.json</td></tr><tr><td>ENABLEDEBUGGER</td><td>Set to FALSE to turn off the task sequence debugger in the progress UI. The debugger is only available with DeployR Enterprise. Default TRUE</td><td>Set by Admin in the bootstrap.json or a Set variable step</td></tr><tr><td>ENABLETOOLS</td><td>Set to FALSE to hide the tools menu (for example the PowerShell and log viewer options) in the progress UI. Default TRUE. Use the "Debugger and tools unlock passcode" server setting to require a passcode instead</td><td>Set by Admin in the bootstrap.json or a Set variable step</td></tr><tr><td>FINISHACTION</td><td>Tell the Task Sequence what to do after the TS finishes - Default is NOT Set, and does nothing.</td><td>reboot, shutdown, logoff, reseal, resealshutdown<br>resealshutdown (DeployR 1.4 and later) reseals the device with sysprep /oobe, then shuts it down instead of restarting</td></tr><tr><td>GATHERLOCALONLY</td><td>TRUE</td><td></td></tr><tr><td>INLINE</td><td>TRUE</td><td>Set by DeployR Step</td></tr><tr><td>INPUTLOCALE</td><td>language code, ex: en-US<br>Used by Apply OS step</td><td>Set by step: Set Windows settings</td></tr><tr><td>INOOBE</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>IPADDRESS001</td><td>192.168.10.137</td><td>Set by DeployR Gather</td></tr><tr><td>IPADDRESS002</td><td>fe80::ef31:32ca:d547:ca8a</td><td>Set by DeployR Gather</td></tr><tr><td>ISDESKTOP</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISLAPTOP</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISSERVER</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISSERVERCOREOS</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISSERVEROS</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISSFF</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISTABLET</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISUEFI</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISUSBMEDIA</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISVM</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>ISWINDOWSPE</td><td>TRUE/FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>MACADDRESS001</td><td>00:15:5D:A6:3A:64</td><td>Set by DeployR Gather</td></tr><tr><td>MAKE</td><td>Microsoft Corporation</td><td>Set by DeployR Gather</td></tr><tr><td>MAKEALIAS</td><td>Microsoft</td><td>Set by DeployR Gather</td></tr><tr><td>MANUFACTURER</td><td>Microsoft Corporation</td><td>Set by DeployR Gather</td></tr><tr><td>MEMORY</td><td>4095</td><td>Set by DeployR Gather</td></tr><tr><td>MESSAGEBOXRESULT</td><td>The button clicked in a message box (OK, Cancel, Abort, Retry, Ignore, Yes, No, TryAgain, Continue), or Timeout. The variable name can be changed in the step</td><td>Set by step: Show message box</td></tr><tr><td>MODEL</td><td>Virtual Machine</td><td>Set by DeployR Gather</td></tr><tr><td>MODELALIAS</td><td>Virtual Machine</td><td>Set by DeployR Gather</td></tr><tr><td>OSCURRENTBUILD</td><td>26100</td><td>Set by DeployR Gather</td></tr><tr><td>OSCURRENTVERSION</td><td>10.0.26100</td><td>Set by DeployR Gather</td></tr><tr><td>OSDSTARTTIME</td><td>Time Stamp</td><td>Set by step: Set Windows settings</td></tr><tr><td>OSSKU</td><td>Ultimate Edition</td><td>Set by DeployR Gather</td></tr><tr><td>OSVERSION</td><td>WinPE</td><td>Set by DeployR Gather</td></tr><tr><td>PEERING</td><td>Enable or Disable BranchCache P2P during Task Sequence. NoCache will use BranchCache to download but will not store the content in the BranchCache cache. Default = TRUE<br>For more download and peering settings, see <a href="/deployr/reference/task-sequence-variables/download-and-peering-variables.md">Download and peering variables</a></td><td>Set via Variable TRUE/FALSE/<br>NoCache or Set by step: Set Windows settings</td></tr><tr><td>PHYSICALHOSTNAME</td><td>Hyper-V virtual machines only: name of the Hyper-V host. Starting with DeployR 1.4, this is also available in Windows PE</td><td>Set by DeployR Gather</td></tr><tr><td>PROCESSORSPEED</td><td>1608</td><td>Set by DeployR Gather</td></tr><tr><td>PRODUCT</td><td>Virtual Machine</td><td>Set by DeployR Gather</td></tr><tr><td>PRODUCTKEY</td><td>YOUR MAK KEY<br>Example: XX123-NMH47-7TTHJ-W3FW7-8HV2C</td><td>Set by User using script or set variable step</td></tr><tr><td>PROGRESSTIMEOUT</td><td>Default 300, modify to have the final Progress UI close sooner or later</td><td>Set by variable at anytime or Set by step: Set Windows settings</td></tr><tr><td>PSMODULEPATH</td><td>X:\Program Files\PowerShell\Modules;x:\program files\powershell\7\Modules;X:\Program Files\WindowsPowerShell\Modules;X:\Windows\system32\WindowsPowerShell\v1.0\Modules;X:\Program Files\PowerShell\;X:\Program Files\PowerShell\7\;X:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\</td><td>Set by DeployR</td></tr><tr><td>RETAINAUTOLOGON</td><td>Set to TRUE to keep the auto logon registry settings when the task sequence ends. Only applies with the "Use AutoAdminLogon and RunOnce" continuation method, where DeployR normally removes the auto logon settings that it configured</td><td>Set by Admin using a Set variable step</td></tr><tr><td>SCRIPT</td><td></td><td>Set by DeployR Step</td></tr><tr><td>SERIALNUMBER</td><td>4102-7492-9856-5816-5097-6344-26</td><td>Set by DeployR Gather</td></tr><tr><td>SETUPMODE</td><td>UEFI</td><td>Set by DeployR Gather</td></tr><tr><td>SKIPINTERNETCHECK</td><td>Set to TRUE to skip checking for a captive portal (a Wi-Fi network that needs a sign-in page) when connecting to the network</td><td>Set by Admin in the bootstrap.json</td></tr><tr><td>SUPPORTSSLAT</td><td>FALSE</td><td>Set by DeployR Gather</td></tr><tr><td>SYSTEMALIAS</td><td>Hyper-V UEFI Release v4.1</td><td>Set by DeployR Gather</td></tr><tr><td>SYSTEMLOCALE</td><td>language code, ex: en-US<br>Used by Apply OS step</td><td>Set by step: Set Windows settings</td></tr><tr><td>SYSTEMSKU</td><td>None</td><td>Set by DeployR Gather</td></tr><tr><td>TIMEZONE</td><td>MS Name for TimeZone, ex: "Central Standard Time"<br>Used by Apply OS step</td><td>Set by step: Set Windows settings</td></tr><tr><td>TSID</td><td>The ID (GUID) of the task sequence to be executed. An example:<br>00000002-0000-0000-0000-000000000001</td><td>Set by DeployR</td></tr><tr><td>UILANGUAGE</td><td>language code, ex: en-US<br>Used by Apply OS step</td><td>Set by step: Set Windows settings</td></tr><tr><td>USERLOCALE</td><td>language code, ex: en-US<br>Used by Apply OS step</td><td>Set by step: Set Windows settings</td></tr><tr><td>UUID</td><td>B4F64D47-CA2D-4030-AB3F-400E256419B1</td><td>Set by DeployR</td></tr><tr><td>VIRTUALMACHINEID</td><td>Hyper-V virtual machines only: the virtual machine ID. Available in Windows PE starting with DeployR 1.4</td><td>Set by DeployR Gather</td></tr><tr><td>VIRTUALMACHINENAME</td><td>Hyper-V virtual machines only: the virtual machine name in Hyper-V. Available in Windows PE starting with DeployR 1.4</td><td>Set by DeployR Gather</td></tr><tr><td>WINPEBUILDINFO</td><td>The Windows build number of WinPE. Ex: 10.0.26100.8737</td><td>Set By DeployR</td></tr></tbody></table>

### From running Task Sequence

To view the current task sequence variables, you can launch PowerShell using the menu in the DeployR progress UI, then run a command to output them to the console. The menu is available by clicking the two parallel lines, which resembles an equals sign (=), just past the "Close" button.

```powershell
Get-ChildItem -Path tsenv:
```

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

<figure><img src="https://content.gitbook.com/content/8m0VARX9oyZ2zXWCdPgr/blobs/uz5jUgYnqfjfR9Qiv6QT/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/reference/task-sequence-variables.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.
