系统环境变量配置正确但powershell无法执行命令

可能是执行权限问题,
权限问题。Powershell脚本的4种执行权限介绍,Windows默认不允许任何脚本运行,我们可以使用"Set-ExecutionPolicy" 命令来改变的PowerShell环境,共有4种运行权限:
Restricted:默认的设置, 不允许任何script运行
AllSigned:只能运行经过数字证书签名的script
RemoteSigned:运行本地的script不需要数字签名,但是运行从网络上下载的script就必须要有数字签名
Unrestricted:允许所有的script运行
Get-ExecutionPolicy -List 查看执行环境策略
执行 Set-ExecutionPolicy RemoteSigned -Scope CurrentUser 设置当前用户具有操作权限
本文讲述了如何处理系统环境变量配置正确但PowerShell无法执行命令的问题,重点介绍了Powershell的四种执行权限设置,包括Restricted、AllSigned、RemoteSigned和Unrestricted,并提供了相应的设置方法和查看策略的步骤。
1121

被折叠的 条评论
为什么被折叠?



