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

Can we default to pwsh? #829

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Can we default to pwsh? #829

wants to merge 6 commits into from

Conversation

matt-richardson
Copy link
Contributor

Background

PowerShell.exe is very slow.

Results

Can we speed it up by using pwsh instead?

How to review this PR

Quality ✔️

Pre-requisites

  • I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • I have considered informing or consulting the right people, according to the ownership map.
  • I have considered appropriate testing for my change.

@matt-richardson matt-richardson self-assigned this Mar 5, 2024

return powerShellPath;
var powerShellCore = new PowerShellCore();
if (powerShellCore.PowerShellCoreExists)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were to do this, we would probably need some sort of configuration to disable/enable.

Also, is it sufficient to find PowerShell core? In the change for the hardening script the branching logic seems to only switch for PowerShell core >= 7.3. Do we need to know the version of PowerShell core?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 7.3 check is to work around a change they made to not load the security stuff - PowerShell/PowerShell#18896

Ironically, it was designed to speed up powershell :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants