[PR #14947] Add pre-build PowerShell version check #30326

Open
opened 2026-01-31 09:40:07 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/14947

State: closed
Merged: Yes


Summary of the Pull Request

Two PowerShell scripts were added so that developers new to the project know if they have the wrong version of PowerShell installed.

Detailed Description of the Pull Request / Additional comments

When first building Terminal, it would continuously fail, and I didn't really know why. I'm new to both this project and to open source, so when I saw this,
image
I was confused and didn't know what went wrong. What I didn't know is that Windows PowerShell and PowerShell Core had different names for their .exe files, and since I had the latest version of Windows PowerShell installed, I figured that I was completely set. So, once I realized that Windows PowerShell (what I had installed) is powershell.exe and PowerShell Core (what I needed to have installed) is pwsh.exe, I downloaded PowerShell Core, and it built without issue. So, in order to help other newbies, I made two scripts, CheckPSVersion and WindowsCheckPSVersion, which make sure that PowerShell Core 7.0.0+ is installed, outputting an error telling the developer to download Core 7.0.0+ if they have Windows PowerShell but not Core. These scripts are run pre-build courtesy of Microsoft.Terminal.Settings.ModelLib.vcxproj

As I said, I'm new here, so any feedback is more than welcome!

Validation Steps Performed

Building with both Windows PowerShell and PowerShell core: builds perfectly, no issues.
Building with Windows PowerShell but not PowerShell core: build fails, but a nice error prints out that reminds the user to download the correct version of PowerShell core.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/14947 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Two PowerShell scripts were added so that developers new to the project know if they have the wrong version of PowerShell installed. ## Detailed Description of the Pull Request / Additional comments When first building Terminal, it would continuously fail, and I didn't really know why. I'm new to both this project and to open source, so when I saw this, ![image](https://user-images.githubusercontent.com/81830231/222797783-723314cb-0220-4aa8-9bcd-22f0c08d27f0.png) I was confused and didn't know what went wrong. What I didn't know is that Windows PowerShell and PowerShell Core had different names for their .exe files, and since I had the latest version of Windows PowerShell installed, I figured that I was completely set. So, once I realized that Windows PowerShell (what I had installed) is powershell.exe and PowerShell Core (what I needed to have installed) is pwsh.exe, I downloaded PowerShell Core, and it built without issue. So, in order to help other newbies, I made two scripts, `CheckPSVersion` and `WindowsCheckPSVersion`, which make sure that PowerShell Core 7.0.0+ is installed, outputting an error telling the developer to download Core 7.0.0+ if they have Windows PowerShell but not Core. These scripts are run pre-build courtesy of `Microsoft.Terminal.Settings.ModelLib.vcxproj` As I said, I'm new here, so any feedback is more than welcome! ## Validation Steps Performed Building with both Windows PowerShell and PowerShell core: builds perfectly, no issues. Building with Windows PowerShell but not PowerShell core: build fails, but a nice error prints out that reminds the user to download the correct version of PowerShell core. ## PR Checklist - [x] Closes #14797 - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:40:07 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30326