# Set-WindowsImageExecutionPolicy

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

![](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

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
```

![](https://3420392058-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpnxLqvh8u2fEz86kIM%2F-MSR_n30S-QA6_XbpPrG%2F-MSRdVYls-Ne-MGuILXL%2Fimage.png?alt=media\&token=986671f9-bf2b-41d0-9527-e39fc8c3d107)

![](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)
