Getting error when used the command Ionic info

C:\Users\Ishaan\Documents\Workspace\Startup\GreenbarnExecutive\Ionic\GreenbarnExecutive>ionic info
Error: Command failed: wmic os get Caption

’wmic’ is not recognized as an internal or external command,
operable program or batch file.

at makeError (C:\Users\Ishaan\AppData\Roaming\npm\node_modules\ionic\node_modules\execa\index.js:174:9)
at Function.module.exports.sync

(C:\Users\Ishaan\AppData\Roaming\npm\node_modules\ionic\node_modules\execa\index.js:338:15)
at windowsRelease
(C:\Users\Ishaan\AppData\Roaming\npm\node_modules\ionic\node_modules\windows-release\index.js:34:24)
at osName (C:\Users\Ishaan\AppData\Roaming\npm\node_modules\ionic\node_modules\os-name\index.js:39:18)
at Object. (C:\Users\Ishaan\AppData\Roaming\npm\node_modules\ionic\lib\index.js:44:24)
at Generator.next ()
at fulfilled (C:\Users\Ishaan\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:104:62)

Hi,

I’m facing the same issue. Could you resolve it?

I’ve just resolved this issue. My problem was an invalid environment variables.

I tried typing TASKKILL at cmd and the console returned that TASKKILL was an invalid command. Then I changed all paths from the PATH variable, replacing %SYSTEMROOT% with “C:/Windows”.

Somehow, this fixed the issue.

Hope it helps!

hi can you please share the screenshot of the environment variable settings! because iam seeing wbem is included in path twice. please refer the below image.