在Windows Server 2008 R2 SP1机器上,我使用chocolatey安装了AWSTools.Powershell软件包。这样,PowerShell 3就被安装了。现在,PowerShell已经完全崩溃,我无法找到任何解决方法或卸载并重新安装它。
我担心唯一的答案是完全重建机器,但想知道是否有修复它的方法。
实际上,PowerShell可以运行,但似乎找不到任何内置的cmdlet。它似乎能找到别名,但无法执行它们下面的内容。例如,发出ls命令查看目录内容会产生以下结果:
我担心唯一的答案是完全重建机器,但想知道是否有修复它的方法。
实际上,PowerShell可以运行,但似乎找不到任何内置的cmdlet。它似乎能找到别名,但无法执行它们下面的内容。例如,发出ls命令查看目录内容会产生以下结果:
PS C:\Users\Administrator> ls
ls : The term 'Get-ChildItem' 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
+ ls
+ ~~
+ CategoryInfo : ObjectNotFound: (Get-ChildItem:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
可能是因为在开始时缺少某些脚本的执行来设置环境。如果您比我更了解并能提供一些帮助,并且可以使我不必重新构建这台机器,我会非常高兴。