> 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/task-sequences/task-sequence-templates/windows-refresh.md).

# Windows refresh

{% hint style="info" %}
Applies to: DeployR 1.4 and later.
{% endhint %}

The **Windows refresh** template starts in an existing Windows 10 or Windows 11 installation, wipes it, and installs a new operating system on the same device while keeping the user data. User state is captured with USMT into a hardlink store, the old OS is removed without reformatting the disk, and the user state is restored once the new OS is running.

Start the task sequence from the existing OS, for example from Intune or by running the DeployR client. See [Starting a task sequence in an existing OS](/deployr/deployment-methods/starting-a-task-sequence-in-an-existing-os.md). The template is tagged **Windows 10** and **Windows 11**, so it only shows up in the task sequence list when running in one of those operating systems.

The template contains these steps:

* **Existing OS**
  * **Set Windows settings for new OS**
  * [**Capture user state with USMT**](/deployr/reference/step-definitions/capture-user-state-with-usmt.md): saves user data to `C:\_2P\StateCapture`.
  * **Reboot to Windows PE**: BitLocker is suspended before restarting.
* **Windows PE**
  * [**Clean drive**](/deployr/reference/step-definitions/clean-drive.md): removes everything except the `_2P` folder, in place of **Format disk**.
  * **Apply OS**
  * **Inject drivers**
  * **Prepare OS**
  * **Reboot to new OS**
* **Full OS**
  * **Configure new OS**
  * **Enable BranchCache**
  * **Enable BitLocker**
  * [**Restore user state with USMT**](/deployr/reference/step-definitions/restore-user-state-with-usmt.md)
  * **Install updates** (disabled by default)
  * **Customizations**: an empty group for your own steps.

After creating a task sequence from this template, edit the **Apply OS** step to select the operating system image and index. Review the **Set Windows settings for new OS** step, which defaults to the US Mountain Standard Time time zone and the en-US locale.

### Things to note

* Do not replace **Clean drive** with **Format disk**. Reformatting the volume destroys the hardlink state store.
* The current computer name is saved by the capture step, so the device keeps its name.
* Rebooting from the existing OS into Windows PE downloads the DeployR Windows PE boot image, so the device needs to reach the DeployR server.


---

# 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/task-sequences/task-sequence-templates/windows-refresh.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.
