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 in Windows 11 doesn't run automatically #29

Open
CBR9612 opened this issue Feb 19, 2023 · 0 comments
Open

PowerShell in Windows 11 doesn't run automatically #29

CBR9612 opened this issue Feb 19, 2023 · 0 comments

Comments

@CBR9612
Copy link

CBR9612 commented Feb 19, 2023

Leaving this here for those who are using this script and have moved to Windows 11 but are not PowerShell experts.

Per this article (https://support.microsoft.com/en-us/windows/command-prompt-and-windows-powershell-for-windows-11-6453ce98-da91-476f-8651-5c14d5777c20#) "In Windows 11 22H2, the default app used to host console windows has been changed to Windows Terminal. ...You can opt out of the modern Windows Terminal experience in a few ways." It goes on to explain the options, including:
Select Start > Settings > Privacy & security > For developers
In Terminal, select Windows Console Host.

The other option is to run the script within the PowerShell console itself, rather than right clicking on the script and selecting Run with PowerShell. For that you will need a basic understanding of how to run scripts at the command line. In short:
1. Run Powershell as Administrator
2. Change to the directory holding the script
3. Type .\scriptname.ps1
where scriptname is the name of the script you want to run. If you get an error, you may need to change your execution policy to RemoteSigned by using this command:
Set-ExecutionPolicy RemoteSigned

Hope this helps someone.

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

1 participant