2017-02-27 132 views
1

我有ARS殼牌1.7.0安裝作爲ARS 6.9 &部分4PowerGUI腳本編輯器無法識別更新的powershell版本?

enter image description hereenter image description here

但是當我做(由$ PSVersionTable.PSVersion,下面的截圖獲得)我的MS(窗口)的PowerShell版本PowerGUI中的版本與2相同?這已經開始後我從shell版本升級到1.7從1.6.9(PowerGUI工作正常與1.6.9)。我不知道爲什麼會發生這種情況&由於這個原因,我無法在PowerGUI編輯器中使用任何查詢cmdlet,這使得調試我的腳本成爲不可能的任務!從PowerGUI的

截圖:

enter image description here

我得到以下錯誤,當我嘗試從PowerGUI的加載ActiveRolesManagementShell:

enter image description here

UPDATE:試圖運行PowerShell的(86),但仍是結果是一樣的,任何人都可以讓我知道世界上哪裏是PowerGUI拾取版本2?

enter image description here

+0

我知道你運行的是低級引擎版本的powershell。 PowerGUI是否有可能會有開關或設置的地方?例如:http://stackoverflow.com/questions/13864429/how-to-run-powershell-v3-console-in-v2-mode –

+0

Thx回來,不幸的是,沒有開關爲PowerGUI :( –

+0

是嗎?您可能已安裝了2.0版本的32位PowerShell,但安裝了版本4.0的64位PowerShell,並解釋了其差異?嘗試運行(x86)版本的PowerShell並在此處執行$ PSVersionTable。 –

回答

0

我認爲這個問題可能是由於ARS 1.7.0是迫使PS2引擎的改變是必需的,按照本:

的Windows PowerShell 4.0和Windows PowerShell中3.0被設計爲向後兼容Windows PowerShell 2.0的 。 Cmdlet,提供程序, 爲Windows PowerShell 2.0編寫的管理單元,模塊和腳本在Windows PowerShell 4.0和Windows PowerShell 3.0中運行的 未更改。 但是,由於.NET Framework 4中Microsoft運行時激活策略的更改,Windows PowerShell 2.0編寫爲 並且使用公共語言運行時間爲 (CLR)2.0編譯的Windows PowerShell主機程序無法在Windows中進行修改而無法運行PowerShell 3.0或 Windows PowerShell 4.0,它們與CLR 4.0一起編譯。 Windows PowerShell 2.0引擎僅用於現有的 腳本或主機程序由於與 不兼容而無法運行的情況。Windows PowerShell 4.0,Windows PowerShell 3.0或Microsoft .NET Framework 4.此類情況預計會很少見。

許多需要Windows PowerShell 2.0引擎的程序會自動啓動它 。這些說明包含在您需要手動啓動發動機的極少情況下 。

0

更新了PowerGUI腳本編輯器版本3.8 &它解決了問題。 PowerGUI現在識別v4

使用版本3的人員。2應該記下它。