> 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/2pxe-server/4.0/configuration/2pxe-config-file/configuration-manager-request-handler.md).

# Configuration Manager Request Handler

{% hint style="danger" %}
**Not supported in 2PXE Server 4.0**

Configuration Manager integration is not currently compatible with 2PXE Server 4.0. The information on this page is retained for reference and should not be used as guidance for a supported 4.0 deployment.
{% endhint %}

The Configuration Manager request handler boots devices into the task sequences deployed to them in Configuration Manager, in the same way as a PXE-enabled distribution point, but using iPXE and HTTP(S) downloads.

## Requirements

* **Integration mode** set to **MEMCM**.
* 2PXE installed on a Configuration Manager distribution point, with the boot images used by your task sequences distributed to it. 2PXE reads the distribution point's configuration and PXE certificate when the service starts. It is recommended that you create a new distribution point and install 2PXE on that dedicated system. A single small VM distribution point is enough to cover the boot needs of an entire enterprise, assuming the recommended setup of iPXE with HTTP and BranchCache enabled.
* Task sequences deployed with the option to make them available to media and PXE, to a collection that the device (or the **Unknown Computers** collection) is a member of.
* For the SQL method (recommended): read access to the Configuration Manager site database. Add the 2PXE server's computer account to the **ConfigMgr\_DViewAccess** group on the site server, and set **SQL Server configuration method** to **ServerInstanceAndDB** (with the **SQL Server instance** and **SQL Server database**) or **Advanced** (with a full **SQL Server connection string**).

## SQL or management point

The handler can find deployments in two ways:

* **SQL** (**SQL Server configuration method** set to **ServerInstanceAndDB** or **Advanced**): 2PXE queries the site database directly. This is faster (the management point runs more or less the same queries behind the scenes), works well over slow connections because very little data is transferred, and returns every deployment available to the device, so 2PXE can show a menu. It also handles multiple computers sharing the same USB network adapter, and multiple computers with the same SMBIOS GUID. **The SQL method only works with the iPXE boot loaders.**
* **Management point** (**SQL Server configuration method** set to **DoNotUseSQL**): 2PXE asks the management point over HTTP, just like the Configuration Manager PXE responder. This only returns one boot action per device, so it is not the preferred option.

![2PXE Request Handlers](https://content.gitbook.com/content/FSXaKC2Zqibd4KXt4dvD/blobs/IylX5SpsIIcfxHUdSQLb/SQLMethod.png)

## How it works

1. When the service starts, 2PXE reads the distribution point's configuration and PXE certificate, and creates its own HTTPS certificate. If the distribution point uses HTTPS, 2PXE also cross-signs the root CA certificate (the one matching **ConfigMgr certificate authority thumbprint**, if set) so that iPXE trusts the distribution point.
2. When a device PXE boots, 2PXE looks it up by SMBIOS GUID and MAC address. If the device is not in Configuration Manager, it is only booted when **Enable ConfigMgr unknown machine support** is turned on, using the deployments to the **Unknown Computers** collection.
3. 2PXE finds the task sequence deployments for the device whose boot image is on this distribution point. If there are none, 2PXE does not boot the device, and it continues with its next boot device.
4. The device boots into iPXE. Unless a required deployment is available, or **Bypass keypress for optional deployment** is turned on, the user must press the boot key (**AcceptBootKeyEFI**/**AcceptBootKeyBIOS**) within **iPXEF12PromptTimeout**, otherwise the device exits to its next boot device.
5. 2PXE shows a menu of the available task sequences, formatted with **MenuDisplayFormat** (or **MenuDisplayFormatDeployed** for task sequences that have already run on the device). Deployments that cannot run on the device (wrong boot image architecture, expired, or not yet available) are listed separately under **Unavailable Task Sequences**. The menu also includes **Computer Information**, **Reboot Computer** and **Exit to next boot device**. Boot images are downloaded with BranchCache (PeerDist) unless **DisablePeerDist** is on; pressing **P** as the menu appears turns BranchCache off for that boot, and it is turned off automatically on networks that StifleR reports as well connected.
6. The selected task sequence's boot image is downloaded from the distribution point over HTTP(S) and started with wimboot. With **Custom variable data generation** turned on, the task sequence variables are generated once the device reaches Windows PE.

## Which task sequence is selected

* If a required deployment is available, it is selected by default. **Enable ConfigMgr mandatory countdown** controls what happens: a value above `0` counts down (in milliseconds) and then runs it, and `0` runs it immediately without showing the menu.
* If **Specify a preferred ConfigMgr advertisement ID** is set to a deployment that targets the device, that deployment is selected instead of other required deployments.
* With **Lean and mean mode** set above `0` (the default is `1`), a device targeted by the preferred deployment boots it straight away without showing the menu. With a value of `2`, the user must first press the boot key.
* If only optional deployments are available, **EnableMenuCountdown** controls the menu: a value above `0` counts down (in milliseconds) and then selects **Exit to next boot device**, and `0` waits until an item is selected. This also applies when **Enable ConfigMgr mandatory countdown** is `-1`.

## Settings used by the Configuration Manager request handler

| Setting                                                                                                                                      | Description                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **SQL Server configuration method**, **SQL Server instance**, **SQL Server database**, **SQL Server connection string**                      | How 2PXE connects to the site database. See above.                                                                                                                                       |
| **Enable ConfigMgr unknown machine support**                                                                                                 | Boots devices that are not in Configuration Manager, using deployments to the **Unknown Computers** collection.                                                                          |
| **Enable ConfigMgr mandatory countdown**, **EnableMenuCountdown**                                                                            | Menu countdowns. See above.                                                                                                                                                              |
| **Specify a preferred ConfigMgr advertisement ID**, **Override required deployment with preferred advertisement ID**, **Lean and mean mode** | Automatic selection of a preferred deployment. See above.                                                                                                                                |
| **Hide hidden ConfigMgr PXE deployments**                                                                                                    | Hides deployments made available to **Only media and PXE (hidden)**.                                                                                                                     |
| **Only show specified ConfigMgr task sequence categories**, **Stript ConfigMgr task sequence categories**                                    | Show only, or hide, task sequences in the listed categories.                                                                                                                             |
| **Order ConfigMgr task sequences by**                                                                                                        | Replaces the SQL `ORDER BY` clause used to sort the deployments, so it must be a complete clause, for example `ORDER BY Known Asc, Mandatory Asc, OfferID Asc` (the default when empty). |
| **Bypass keypress for optional deployment**                                                                                                  | Skips the "press a key to boot" prompt.                                                                                                                                                  |
| **Send ConfigMgr state messages**                                                                                                            | Sends deployment state messages to Configuration Manager. Turn this off when using a Rubicon step in the task sequence.                                                                  |
| **ConfigMgr management point override**, **External FQDN ConfigMgr override**, **ConfigMgr certificate authority thumbprint**                | Override the management point, the distribution point host name used in content URLs, and the root CA certificate to trust.                                                              |
| **MenuWelcomeLine**, **MenuDisplayFormat**, **MenuDisplayFormatDeployed**, **SelectLine**                                                    | Text and format of the boot menu.                                                                                                                                                        |
| **Username**, **Password**                                                                                                                   | The account used to download content from the distribution point, if it does not allow anonymous access.                                                                                 |

Most of these settings are only shown when **Show advanced** is turned on. See [Configuring 2PXE Server](/2pxe-server/4.0/configuration/2pxe-config-file.md) for descriptions of all settings.


---

# 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/2pxe-server/4.0/configuration/2pxe-config-file/configuration-manager-request-handler.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.
