> 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/osd-toolkit/4.0/installation/configuring-the-task-sequence.md).

# Configuring the task sequence

A task sequence needs three variables and two steps. Placement of the two steps is the part that most often goes wrong.

## Variables

Add **Set Task Sequence Variable** steps before the first step that downloads content. The variables can also be set as collection variables.

| Variable                       | Value            | Why                                                                                          |
| ------------------------------ | ---------------- | -------------------------------------------------------------------------------------------- |
| `SMSTSDownloadProgram`         | `OSDToolkit.exe` | Hands downloads to OSD Toolkit. Use the full path if the exe is not in `System32`            |
| `OSDTKLicense`                 | Your license key | Without a valid key every download falls back to the built-in downloader                     |
| `SMSTSAllowTokenAuthURLForACP` | `true`           | Enhanced HTTP sites only. Without it the distribution point URLs are hidden from OSD Toolkit |

All other variables are optional; see [Task Sequence variables](https://documentation.2pintsoftware.com/osd-toolkit/4.0/reference/task-sequence-variables.md).

## Steps

Add two **Run Command Line** steps. No `cmd.exe` wrapper and no package are needed.

| Step              | Place it                                                                                | Command line             |
| ----------------- | --------------------------------------------------------------------------------------- | ------------------------ |
| OSD Toolkit Prep  | Windows PE, after **Apply Operating System** and before **Setup Windows and ConfigMgr** | `OSDToolkit.exe Prep C:` |
| OSD Toolkit Cache | Full OS, right after **Setup Windows and ConfigMgr**. Tick *Continue on error*          | `OSDToolkit.exe Cache`   |

### Prep

Prep copies `OSDToolkit.exe` and `OSDToolkit-EnableBranchCache.ps1` into the `System32` folder of the new OS and stages the StifleR client if the boot image has one. The argument is the drive letter of the new OS as seen from Windows PE.

### Cache

Cache enables BranchCache in the new OS and adds everything downloaded in Windows PE to the BranchCache cache. It must run while `C:\_SMSTaskSequence` still exists. For a Windows image it takes a few minutes.

Without these two steps nothing downloaded in Windows PE is ever shared, and every device pulls from the distribution point.

## Downloads in the full OS

To keep using OSD Toolkit for content downloaded after the restart into the new OS, set `SMSTSDownloadProgram` again after Prep.

## Resulting layout

```
Set Task Sequence Variable   SMSTSDownloadProgram = OSDToolkit.exe
Set Task Sequence Variable   OSDTKLicense = <key>
Set Task Sequence Variable   SMSTSAllowTokenAuthURLForACP = true    (Enhanced HTTP only)
...
Apply Operating System
...
Run Command Line             OSDToolkit.exe Prep C:
Setup Windows and ConfigMgr
Run Command Line             OSDToolkit.exe Cache                   (Continue on error)
...
```


---

# 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/osd-toolkit/4.0/installation/configuring-the-task-sequence.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.
