# 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](https://osd.osdeploy.com/docs/trash/dism/broken-reference)
* [Set-WindowsImageExecutionPolicy](https://osd.osdeploy.com/docs/trash/dism/set-windowsimageexecutionpolicy)
* [Dismount-WindowsImageOSD](https://osd.osdeploy.com/docs/trash/dism/broken-reference) -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)
