windows - 如何摆脱 Batch/Powershell 中的安全警告

标签 windows security powershell batch-file execution

enter image description here我正在尝试通过批处理文件执行 powershell 脚本并不断收到以下警告;

-> 执行策略设置为远程签名;我也用 Unrestricted 测试过,同样的错误出现了;如何摆脱这个?

最佳答案

您的 ps1 脚本是否位于网络共享中?您可以通过在管理员 powershell 控制台中键入 set-executionpolicy bypass 来跳过所有安全过程

或者您可以通过 powershell.exe -executionpolicy bypass -file\\servername\share\script.ps1 调用您的脚本

关于windows - 如何摆脱 Batch/Powershell 中的安全警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14817141/

相关文章:

java - 点对点聊天安全选项?

powershell - 用于查找/运行计划任务或创建的Powershell脚本

c - 在 Windows 中拦截库调用的最简单方法是什么?

PHP 7 不适用于 Windows 10

mysql - 这个 MySQL 查询如何容易受到 SQL 注入(inject)攻击?

powershell - 从cmd文件调用.ps1会给出错误::术语 '.\setup.ps1'无法识别为cmdlet,函数,脚本文件的名称

基于环境变量更新配置文件的 PowerShell 脚本

c++ - 创建窗口和线程 - C++

windows - DirectShow开发测试设备

security - 在 web.xml 之外定义一个 <security-constraint>(例如,服务器范围)