> 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/introduction/how-osd-toolkit-works.md).

# How OSD Toolkit works

## The Alternate Content Provider

A Configuration Manager task sequence downloads its content with a built-in downloader. Setting the task sequence variable `SMSTSDownloadProgram` replaces it: from then on the task sequence starts that program once for every package it needs and waits for it to finish.

OSD Toolkit is such a program. For each package it:

1. Reads the list of distribution points and the credentials from the task sequence environment.
2. Asks a distribution point for the file list of the package.
3. Downloads the files, several at a time. Each file comes from BranchCache peers on the local network where they have it, and from the distribution point where they do not.
4. Shows progress in the task sequence dialog and returns 0.

If OSD Toolkit returns anything other than 0, the task sequence downloads the package with its built-in downloader. A problem in OSD Toolkit therefore costs peering for that package, not the deployment.

## Scope

OSD Toolkit handles the content a task sequence downloads itself: packages, operating system images, boot images and driver packages. Applications and software updates are downloaded by the Configuration Manager client through a different mechanism and are not affected.

## From Windows PE to the new OS

Content downloaded in Windows PE lands on the disk of the device, but the new operating system does not know it has it. Two task sequence steps close that gap:

| Step      | Runs in                             | What it does                                                                                |
| --------- | ----------------------------------- | ------------------------------------------------------------------------------------------- |
| **Prep**  | Windows PE, after the OS is applied | Copies OSD Toolkit into the new OS and stages the StifleR client if the boot image has one. |
| **Cache** | The new OS                          | Enables BranchCache and adds everything downloaded in Windows PE to the BranchCache cache.  |

After Cache has run, the device serves that content to the next devices being deployed on the same network.

## Where the content comes from

* **Peers.** Devices on the local network with BranchCache enabled that hold the content, typically devices deployed earlier.
* **The distribution point.** Everything no peer has. OSD Toolkit authenticates the way the task sequence would: Network Access Account, PKI client certificate or Enhanced HTTP token.

What to expect from peering in practice is described in [Peering during deployments](https://documentation.2pintsoftware.com/osd-toolkit/4.0/operations/peering.md).


---

# 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/introduction/how-osd-toolkit-works.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.
