> For the complete documentation index, see [llms.txt](https://www.osdeploy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.osdeploy.com/osdeploy-insider/how-to/winpestartup-core-import-root-certificate.md).

# WinpeStartup Core: Import a WinPE Root Certificate with a .cer File

Import a WinPE root certificate from a .cer file in the shared WinpeStartup Core main folder.

Place a `.cer` root certificate in the shared WinpeStartup Core `main` folder to import it when WinPE starts.

{% hint style="warning" %}
Only add a root certificate after verifying that it belongs to a certificate authority you intend to trust.
{% endhint %}

## Import the Certificate

{% stepper %}
{% step %}

### Create the main Folder

Create the shared folder on the OSDeploy build computer:

```powershell
$MainDirectory = Join-Path $env:ProgramData 'OSDeployCore\boot-assets\winpestartup-core\main'
New-Item -Path $MainDirectory -ItemType Directory -Force | Out-Null
```

{% endstep %}

{% step %}

### Copy the .cer File

Copy your verified root certificate into the folder. Replace the source path with the location of your certificate:

```powershell
Copy-Item -LiteralPath 'C:\Certificates\ContosoRoot.cer' -Destination $MainDirectory
```

{% endstep %}

{% step %}

### Build WinPE Media

Run the build command. OSDeploy includes the shared `main` folder automatically when it is present:

```powershell
Build-OSDeployBoot
```

Boot the resulting media to import the certificate into WinPE's local-machine trusted root certificate store.
{% endstep %}
{% endstepper %}


---

# 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://www.osdeploy.com/osdeploy-insider/how-to/winpestartup-core-import-root-certificate.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.
