有誰知道如何讓我的ps2exe.ps1被執行? 我得到這個例外,並沒有解決它的線索。Powershell甚至無法執行設置執行策略
PS C:\> Set-ExecutionPolicy RemoteSigned
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 desc
about_Execution_Policies help topic. Do you want to change the execution policy?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
PS C:\> .\ps2exe.ps1
File C:\ps2exe.ps1 cannot be loaded. The file C:\ps2exe.ps1 is not digitally signed. The script will not execute on the system. Please see "get-help
At line:1 char:13
+ .\ps2exe.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
是您在本地創建的腳本還是從互聯網下載的腳本? – poiu2000
根據此頁面從互聯網 –
下載:http://technet.microsoft.com/en-us/library/ee176961.aspx,下載的腳本必須先由受信任的發佈者簽名,然後才能運行。也許你應該暫時將策略設置爲Unrestricted以使該腳本運行 – poiu2000