亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Powershell說:“在這個系統上,腳本的執行是禁用的。”

Powershell說:“在這個系統上,腳本的執行是禁用的。”

holdtom 2019-07-01 10:57:26
Powershell說:“在這個系統上,腳本的執行是禁用的。”我在試著CMD調用Powershell腳本cmd.exe,我得到以下錯誤:Management_Install.ps1由于在此系統上禁用了腳本的執行,因此無法加載。我跑了Set-ExecutionPolicy -ExecutionPolicy Unrestricted當我跑的時候Get-ExecutionPolicy從…Powershell,我得到Unrestricted背。PS C:\Users\Administrator\> Get-ExecutionPolicyUnrestrictedC:\Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\Install\Scripts\> powershell .\Management_Install.ps1 1WARNING: Running x86 PowerShell...檔案C:\Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\Install\Scripts\Management_Install.ps1由于在此系統上禁用了腳本的執行,因此無法加載。請看“get-help about_signing“更多細節。一行:1字符:25.\Management_Install.ps1 <<<< 1類別信息:NotSpecified:(:)[],PSSecurityExceptionFullyQualifiedErrorId:RuntimeExceptionC:\Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\Install\Scripts\> PAUSEPress any key to continue . . .系統采用WindowsServer2008R2。我做錯什么了?
查看完整描述

3 回答

?
人到中年有點甜

TA貢獻1895條經驗 獲得超7個贊

如果你用WindowsServer 2008R2那么就有一個x64x86PowerShell的版本,這兩個版本都必須設置它們的執行策略。您在兩臺主機上設置了執行策略嗎?

作為管理員,可以通過在PowerShell窗口中鍵入以下內容來設置執行策略:

Set-ExecutionPolicy?RemoteSigned


查看完整回答
反對 回復 2019-07-01
?
呼如林

TA貢獻1798條經驗 獲得超3個贊

我有一個類似的問題,并注意到默認cmd在……上面WindowsServer 2012正在運行x64一號。

Windows 7,?Windows 8,?Windows 10,?WindowsServer 2008 R2WindowsServer 2012,運行以下命令管理員:

x86(32位)
打開C:\Windows\SysWOW64\cmd.exe
運行命令powershell Set-ExecutionPolicy RemoteSigned

x64(64位)
打開C:\Windows\system32\cmd.exe
運行命令powershell Set-ExecutionPolicy RemoteSigned

您可以使用

  • 在CMD中:

    echo %PROCESSOR_ARCHITECTURE%

  • 在Powershell中:

    [Environment]::Is64BitProcess


查看完整回答
反對 回復 2019-07-01
  • 3 回答
  • 0 關注
  • 832 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號