[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
PS D:\test\Nvdia> Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process    RemoteSigned
  CurrentUser    RemoteSigned
LocalMachine    RemoteSigned


PS D:\test\Nvdia> powershell -file .\nvidia.ps1
无法加载文件 D:\test\Nvdia\nvidia.ps1。未对文件 D:\test\Nvdia\nvidia.ps1 进行数字签名。无法在当前系统上运行该脚本。有关
运行脚本和设置执行策略的详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
    + CategoryInfo          : SecurityError: ( [],ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess

脚本右键属性也看了,没有锁定。

Windows 11 22H2 x64 zh-cn 管理员也无法运行。

这是怎么回事,找了台Windows 10的系统,发现可以运行。

TOP

没事了,
在这里找到解决方法了:https:/go.microsoft.com/fwlink/?LinkID=135170

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

TOP

返回列表