> 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/powershell-modules/osd/edit-mywinpe.md).

# Edit-MyWinPE

Mounts and edits a WinPE WIM file

| Property | Value                 |
| -------- | --------------------- |
| Module   | OSD                   |
| Platform | WinPE (amd64 / arm64) |

## Description

Mounts and edits a WinPE WIM file

## Syntax

```powershell
Edit-MyWinPE [-ImagePath <String[]>] [-Index <UInt32>] [-CloudDriver <String[]>] [-DriverHWID <String[]>]
 [-DriverPath <String[]>] [-ExecutionPolicy <String>] [-PSModuleInstall <String[]>] [-PSModuleCopy <String[]>]
 [-PSGallery] [-Wallpaper <String>] [-DismountSave] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## Parameters

| Parameter          | Type              | Required | Description                                                                                                                                                 |
| ------------------ | ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-ImagePath`       | `String[]`        | False    | Path to the WinPE WIM file. This file must be local and not on a USB or Network Share                                                                       |
| `-Index`           | `UInt32`          | False    | Index of the WinPE WIM file to mount. Default is 1                                                                                                          |
| `-CloudDriver`     | `String[]`        | False    | WinPE Driver: Download and install in WinPE drivers from Dell,HP,IntelNet,LenovoDock,Nutanix,Surface,USB,VMware,WiFi                                        |
| `-DriverHWID`      | `String[]`        | False    | WinPE Driver: HardwareID of the Driver to add to WinPE                                                                                                      |
| `-DriverPath`      | `String[]`        | False    | WinPE Driver: Path to additional Drivers you want to add to WinPE                                                                                           |
| `-ExecutionPolicy` | `String`          | False    | PowerShell: Sets the PowerShell Execution Policy of WinPE. Bypass is recommended                                                                            |
| `-PSModuleInstall` | `String[]`        | False    | PowerShell: Installs named PowerShell Modules from PowerShell Gallery to WinPE                                                                              |
| `-PSModuleCopy`    | `String[]`        | False    | PowerShell: Copies named PowerShell Modules from the running OS to WinPE This is useful for adding Modules that are customized or not on PowerShell Gallery |
| `-PSGallery`       | `SwitchParameter` | False    | PowerShell: Enables PowerShell Gallery functionality in WinPE                                                                                               |
| `-Wallpaper`       | `String`          | False    | Sets the specified Wallpaper JPG file as the WinPE Background                                                                                               |
| `-DismountSave`    | `SwitchParameter` | False    | Dismounts and saves changes to the mounted WinPE WIM                                                                                                        |

## Examples

No examples provided in source documentation.

## Related

* <https://github.com/OSDeploy/OSD/tree/master/docs>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.osdeploy.com/powershell-modules/osd/edit-mywinpe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
