[英]Execution Policy error when running powershell script from autohotkey
[英]Running powershell script from explorer = execution policy error
腳本在PowerShell中運行良好。 如何從Windows資源管理器運行它們?
您確定這是執行政策錯誤嗎? 如果是PowerShell v2,請嘗試在文件名前包含-File
參數:
"C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -File "%1"
我想到了。 “about_Execution_Policies”幫助項目中有線索。 流程執行策略必須更具限制性,這將覆蓋由標准Set-ExecutionPolicy命令設置的localmachine策略。
組策略會覆蓋所有這些。 你得到一個模板,從微軟設置,忽略頁面的一部分,說這只適用於贏得XP,這是錯誤的。 該頁面及上面的幫助文件包含其他所需的說明。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.