> 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-bare-metal-to-entra-id.md).

# Windows bare metal to Entra ID

The **Windows bare metal to Entra ID** template deploys Windows to a new or wiped device and joins it to Entra ID. When automatic MDM enrollment is configured for your tenant, the device is also enrolled in Intune.

The template contains these steps:

* **Windows PE**
  * **Set Windows settings**
  * **Format disk**
  * **Apply OS**: uses the **Use Specialize phase RunSynchronous command** continuation method.
  * **Inject drivers**
  * **Prepare OS**
  * [**Join Entra ID**](/deployr/reference/step-definitions/join-entra-id.md): uses the provisioning package in the **DeployR Entra ID join bulk enrollment token** content item.
  * **Reboot**
* **Full OS**
  * **Configure new OS**
  * **Enable BranchCache**
  * [**Set Intune device owner**](/deployr/reference/step-definitions/set-intune-device-owner.md) (disabled by default)
  * **Install updates** (disabled by default)
  * **Set FINISHACTION**: sets `FINISHACTION` to `REBOOT`, so the device restarts when the task sequence completes.

After creating a task sequence from this template:

1. Edit the **Apply OS** step to select the operating system image and index.
2. Make sure the bulk enrollment token content item contains a current provisioning package. See [Join Entra ID](/deployr/reference/step-definitions/join-entra-id.md) for how to generate it with `GeneratePPKG.ps1`. The token expires after 179 days.
3. Optionally, enable **Set Intune device owner** and specify the user's UPN. This requires [Microsoft Graph API access](/deployr/integrations/microsoft-graph-api-access.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/deployr/task-sequences/task-sequence-templates/windows-bare-metal-to-entra-id.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.
