Compass is freezing at "INITIALIZING"

The problem is:
‘powershell’ is not recognized as an internal or external command,
operable program or batch file. When I change the path system variables to C:\Windows\System32\WindowsPowerShell\v1.0 , Compass worked.
but how to solve the problem by keeping the path: C:\Program Files\MongoDB\Server\4.2\bin ?

The full error:

loading.js:29 Error: Command failed: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption
‘powershell’ is not recognized as an internal or external command,
operable program or batch file.

at makeError (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\execa\index.js:338:15)
at windowsRelease (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\windows-release\index.js:39:19)
at osName (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\os-name\index.js:39:18)
at Object.default (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\mongodb-js-metrics\lib\resources\app.js:31:16)
at result (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\mongodb-js-metrics\node_modules\lodash\result.js:51:40)
at child.getAttributes (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\mongodb-js-metrics\node_modules\ampersand-state\ampersand-state.js:430:55)
at child.serialize (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\mongodb-js-metrics\node_modules\ampersand-state\ampersand-state.js:104:24)
at child.<anonymous> (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\mongodb-js-metrics\lib\resources\base.js:28:26)
at arrayEach (C:\Users\siham\Downloads\mongodb-compass-1.22.1-win32-x64\resources\app.asar\node_modules\ampersand-collection-lodash-mixin\node_modules\lodash\_arrayEach.js:15:9)

You can have both mongodb/bin and powershell paths
Thats what i see on my Windows system