简体   繁体   English

Set-ExecutionPolicy哪个是正确的?

[英]Set-ExecutionPolicy which is the right one?

I have a Powershell script which is stored in a shared Folder on a machine in my Domain. 我有一个Powershell脚本,该脚本存储在域中计算机上的共享文件夹中。 Now I want to run this script on a Server which is in DMZ. 现在,我想在DMZ中的服务器上运行此脚本。 What ExecutionPolicy must de domain server and the dmz server have to run this script? 域服务器和dmz服务器必须运行哪个ExecutionPolicy? "Everyone" has "full rights" to run the script, but It doesn't work. “每个人”都具有运行脚本的“完整权限”,但是它不起作用。

can I do that with set-executionpolicy ? 我可以使用set-executionpolicy来做到这一点吗?

thanks! 谢谢!

For running remote scripts you either need Set-ExecutionPolicy Unrestricted , run the script with powershell.exe -ExecutionPolicy Bypass , or sign the scripts . 要运行远程脚本,您需要Set-ExecutionPolicy Unrestricted ,使用powershell.exe -ExecutionPolicy Bypass运行脚本,或者对脚本进行签名

Note that bypassing or changing the execution policy will only work if it's not enforced with a local or group policy. 请注意,绕过或更改执行策略仅在未通过本地策略或组策略强制执行时才有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM