Visual Studio 代码扩展生成器不工作

Visual Studio Code extension generator not working

我正在遵循“Your first extension”visual studio 代码指南,并在使用 npm 和 运行 [=14] 安装 yogenerator-code 之后=] 我得到这个错误

C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:347
                throw err;
                ^

Error: Command failed: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption
The term 'Get-CimInstance' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
 of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:17
+ (Get-CimInstance <<<<  -ClassName Win32_OperatingSystem).caption
    + CategoryInfo          : ObjectNotFound: (Get-CimInstance:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException



    at makeError (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:174:9)
    at Function.module.exports.sync (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:338:15)
    at windowsRelease (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\windows-release\index.js:39:19)
    at osName (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\os-name\index.js:39:18)
    at new Insight (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\insight\lib\index.js:37:13)
    at Object.<anonymous> (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\lib\cli.js:54:17)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)

我真的不知道该怎么做所以任何帮助都会得到帮助

通过从 PowerShell v1.0 更新到 PowerShell v5.1 解决