# Set-WindowsImageExecutionPolicy

By default, WinPE has the PowerShell Execution Policy to Restricted.  This can easily be changed

![](/files/-MSR_y6_ykNmoIt3_ndc)

## Example

One thing to keep in mind that if you don't specify the Set-WindowsImageExecutionPolicy Path, it will apply to all mounted Windows Images

```
Mount-WindowsImageOSD -ImagePath "T:\WinPE\sources\boot.wim"
Set-WindowsImageExecutionPolicy Bypass
Dismount-WindowsImageOSD -Save
```

![](/files/-MSRdVYls-Ne-MGuILXL)

![](/files/-MSRcW_v-biZhkaXhDAG)


---

# Agent Instructions: 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:

```
GET https://osd.osdeploy.com/docs/trash/dism/set-windowsimageexecutionpolicy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
