-
Notifications
You must be signed in to change notification settings - Fork 211
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
[Bug] fails in PowerShell Core 7.x (but works in PowerShell Classic 5.x) #832
Comments
Are you on a restricted user account? What version of Windows, PowerShell ( |
|
Dusting off my Windows computer... I can confirm in PowerShell Core 7.3.9 that running I suppose that if I update from Windows 10.0.22000 (which is actually Windows 11) to the current version, I will probably be plagued with the same problem in PowerShell (native). Perhaps I could add a try around |
@jkunkee Any idea how users can run scripts with the new PowerShell permission system? |
@michaelgracious What do you get for the output of this? Get-ExecutionPolicy -List I always thought it was stupid that for a script to get permissions to run, all it had to do was literally give itself permission to run as the first thing it did when it was running... but if they "fixed" that, well, then I don't think you can get scripts to run without going into admin settings. Will you also try this? Set-ExecutionPolicy -Scope Process Bypass
webi --help
webi webi Meanwhile... I run upgrades... |
@michaelgracious I've finished updating Windows 11 ARM and it only brought my native PowerShell to 5.1.x, and Webi still works in that. So it looks like PowerShell Core can't call out to powershell classic. I think we may run into a problem where we have to detect whether it's PowerShell Classic or PowerShell Core... |
Some more notes: From webi-installers/webi/webi-pwsh.ps1 Line 136 in 7b70ab8
@echo off
powershell -ExecutionPolicy Bypass -File "%USERPROFILE%\.local\bin\webi-pwsh.ps1" %* |
ChatGPT happened to spit this out at me about how to install Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) I think that may be relevant to the distinction between security policies in PowerShell Classic and PowerShell Core, so I'm just plopping it down here for now. |
Also while I was looking up some info on
Maybe using |
What were you trying to install (or what else went wrong)?
installing/updating ANY webi package
What exactly did you do?
Running
webi webi
for instanceWhat went wrong?
Running the this command using Windows Terminal (running powershell 7.4.1 or 7.5 preview) results in an error (any installer fails, just using
webi webi
as an example)Windows Terminal is running version
1.20.10822.0
Might be related to PowerShell/PowerShell#18530 ?
Which OS did you try on?
What type of computer (i.e. laptop, desktop, Raspberry Pi)?
The text was updated successfully, but these errors were encountered: