其实电脑上已经装有powershell,在路径C:\Windows\System32\WindowsPowerShell\v1.0可以找到。
但是在cmd输入powershell却显示
“powershell”不是内部或外部命令,也不是可运行的程序或批处理文件。
解决方案:添加环境变量。
在文件管理器右键“此电脑”,选择属性。
点击右侧“高级系统设置”。
点击“环境变量”,在系统变量中找到Path,点击编辑。
添加以下4个环境变量,重启电脑即可。
%SystemRoot%
%SystemRoot%\System32
%SystemRoot%\System32\Wbem
%SystemRoot%\System32\WindowsPowerShell\v1.0