Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell execution policy #3

Open
antoniohlopes opened this issue Dec 27, 2023 · 4 comments
Open

Powershell execution policy #3

antoniohlopes opened this issue Dec 27, 2023 · 4 comments

Comments

@antoniohlopes
Copy link

.ps1 files cannot be load and/or executed.
The execution the ps1 files are limited to the digitally signed, to bypass this; the command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine" is necessary to execute vdproj convertion to wix.
To block not signaled powershell script, execute this command "Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope LocalMachine"
more details in [About execution policy] (https:/go.microsoft.com/fwlink/?LinkID=135170)

@chrisoldwood
Copy link
Owner

Sorry, I'm not sure what you're asking here? What you've described above is basic PowerShell documentation for executing scripts but there doesn't appear to be an actionable point to this issue. Can you say more about what you're expecting from this?

@Skgland
Copy link

Skgland commented Jul 11, 2024

I think the file was probably marked as downloaded from the web, Mark of the Web.

One can unmark a file in the file properties by checking the Unblockcheckbox.
image

@chrisoldwood
Copy link
Owner

Or, given you'll probably already be in a PowerShell session to run the script, you can use the Unblock-File cmdlet, e.g.

PS> Unblock-File vdproj2wix.ps1

As for the default execution policy I've tended to default to RemoteSigned which gives me enough rope for local development.

@chrisoldwood
Copy link
Owner

As I was the author of the script I've never had to download the .ps1 file directly from GitHub so it's never been blocked, hence it seems like I need to add a comment to the README at some point about doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants