无法运行“Install-Script”引发错误

无法运行“Install-Script”引发错误

我正在尝试安装Show-Tree插件powershell但总是出现以下错误:

PS C:\Windows\system32> Install-Script -Name Show-Tree
Install-Script : The term 'Install-Script' 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:1
+ Install-Script -Name Show-Tree
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-Script:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

如何解决这个问题?正确的安装方法是什么Show-tree脚本链接

答案1

尝试使用以下方法:

Install-Module -Name Show-Tree

这是安装模块时的正确命令

相关内容