為什麼50%的時間都會跳出執行原則變更提示?

為什麼50%的時間都會跳出執行原則變更提示?
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"):

在我執行 ps1 腳本的一半時間裡,可能會出現上面的提示。有時我可以關閉 Powershell 窗口,再次運行腳本,它就會順利運行。其他時候我會再次收到提示。

這種情況在 Windows 10 的各種內部版本和版本(Insider、LTSC、Home)中經常發生,包括全新安裝,現在也發生在 11 中。

我確保Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned在運行任何腳本之前運行。

這只是微軟的另一個錯誤嗎?

相關內容