【发布时间】:2021-05-03 14:44:29
【问题描述】:
当我尝试通过任务计划程序运行 PowerShell 脚本 .ps1 文件时
像这样我得到0*1 Error
powershell.exe
arguments :-File "E:\v tes\hash v.ps1"
但是当使用以下命令运行命令时:
-NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass `
-File "E:\v tes\hash v.ps1"
它似乎在工作
我需要担心绕过 ExecutionPolicy 吗?
通过在 Bypass 中运行带有 ExecutionPolicy 的命令来绕过 PowerShell 中的执行策略时是否存在任何安全风险?
【问题讨论】:
-
or is it only bypassing it one time and Only for this Script-- 如果它以任何其他方式起作用,我会感到惊讶。
标签: powershell