diff --git a/src/session.ts b/src/session.ts index 5a2cd3a6ac..e934994312 100644 --- a/src/session.ts +++ b/src/session.ts @@ -127,7 +127,9 @@ export class SessionManager implements Middleware { let powerShellExeDetails; if (this.sessionSettings.powerShellDefaultVersion) { for (const details of this.powershellExeFinder.enumeratePowerShellInstallations()) { - if (details.displayName === this.sessionSettings.powerShellDefaultVersion) { + // Need to compare names case-insensitively, from https://stackoverflow.com/a/2140723 + const wantedName = this.sessionSettings.powerShellDefaultVersion; + if (wantedName.localeCompare(details.displayName, undefined, { sensitivity: "accent" }) === 0) { powerShellExeDetails = details; break; }