# WebPSScript

## Invoke-WebPSScript

This is quite a simple function that allows me to Invoke a PowerShell script in a URL.  As you can see this is working in WinPE, but fails when I try to Install-Module.  That's because PowerShell Gallery doesn't work in WinPE by default.  I guess I need to read this first

{% content-ref url="winpe/enable-pewimpsgallery" %}
[enable-pewimpsgallery](https://osd.osdeploy.com/docs/trash/winpe/enable-pewimpsgallery)
{% endcontent-ref %}

![](https://3420392058-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpnxLqvh8u2fEz86kIM%2F-MVINamXzbVHAYnOF4QP%2F-MVINlKKXsILUFq-xeBd%2Fimage.png?alt=media\&token=8107fb17-2dae-47de-b881-5fba8afc383f)
