Ionic info fails

I’m trying to run ionic info. I’m using windows 10 and vscode.

PS C:\Development\Projects\Ionic\Workout> ionic info
[ERROR] Command failed with exit code 1: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption

    'powershell' is not recognized as an internal or external command,
    operable program or batch file.

But if I run the command: ionic docs, the command runs correctly.


Adding a new entry into the environmental variable PATH corrected the problem.

I had: %SYSTEMROOT%\System32\WindowsPowerShell\v1.0
I added: C:\Windows\System32\WindowsPowerShell\v1.0
The command ionic info runs fine now.