> For the complete documentation index, see [llms.txt](https://osd.osdeploy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://osd.osdeploy.com/docs/trash/dism/set-wimexecutionpolicy.md).

# Set-WimExecutionPolicy

You can't do much in PowerShell without setting the ExecutionPolicy

![](https://3420392058-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpnxLqvh8u2fEz86kIM%2F-MSR_n30S-QA6_XbpPrG%2F-MSR_y6_ykNmoIt3_ndc%2Fimage.png?alt=media\&token=20e31f30-2baa-44ea-b9c6-ccd4fa80e78f)

## Example

This function will perform the following actions in one step

* [Mount-WindowsImageOSD](broken://pages/-LuGfgiq5vjs_Ela0mly)
* [Set-WindowsImageExecutionPolicy](/docs/trash/dism/set-windowsimageexecutionpolicy.md)
* [Dismount-WindowsImageOSD](broken://pages/-MSRSwYVMkV_nOMK2EmB) -Save

```
Set-WIMExecutionPolicy -ImagePath "D:\WinPE\sources\boot.wim" -ExecutionPolicy Bypass
```

![](https://3420392058-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpnxLqvh8u2fEz86kIM%2F-MSR_n30S-QA6_XbpPrG%2F-MSRbKv0QnIFFPOsOhdI%2Fimage.png?alt=media\&token=afcaab12-fa0b-4824-8727-fb04befecfc6)

![](https://3420392058-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpnxLqvh8u2fEz86kIM%2F-MSR_n30S-QA6_XbpPrG%2F-MSRcW_v-biZhkaXhDAG%2Fimage.png?alt=media\&token=e4af04e1-efac-4043-a489-c77570074e5a)
