Reputation: 383
I have ARS Shell 1.7.0 installed as part of ARS 6.9 & my MS (windows) powershell version is 4 (obtained by $PSVersionTable.PSVersion, screenshot below)
however when I do the same within the PowerGUI I get version as 2? This has started after i upgraded by shell version to 1.7 from 1.6.9 (PowerGUI worked fine with 1.6.9). I have no clue why is this happening & due to this I'm unable to use any quest cmdlets within the PowerGUI editor which make debugging my scripts an impossible task!
Screenshot from PowerGUI :
I get below error when i try to load ActiveRolesManagementShell from PowerGUI:
UPDATE: tried running Powershell (x86) but still the result is same, can anyone please let me know where in the world is PowerGUI picking up version 2 ?
Upvotes: 1
Views: 1580
Reputation: 383
Updated the PowerGUI Script editor to version to 3.8 & it resolved the issue. PowerGUI now recognizes v4
People using ver 3.2 should make a note of it.
Upvotes: 1
Reputation: 23395
I think the issue might be due to a change in ARS 1.7.0 that is forcing the PS2 engine to be required, per this:
Windows PowerShell 4.0 and Windows PowerShell 3.0 are designed to be backwards compatible with Windows PowerShell 2.0. Cmdlets, providers, snap-ins, modules, and scripts written for Windows PowerShell 2.0 run unchanged in Windows PowerShell 4.0 and Windows PowerShell 3.0. However, due to a change in the runtime activation policy in Microsoft .NET Framework 4, Windows PowerShell host programs that were written for Windows PowerShell 2.0 and compiled with Common Language Runtime (CLR) 2.0 cannot run without modification in Windows PowerShell 3.0 or Windows PowerShell 4.0, which are compiled with CLR 4.0. The Windows PowerShell 2.0 Engine is intended to be used only when an existing script or host program cannot run because it is incompatible with Windows PowerShell 4.0, Windows PowerShell 3.0, or Microsoft .NET Framework 4. Such cases are expected to be rare.
Many programs that require the Windows PowerShell 2.0 Engine start it automatically. These instructions are included for the rare situations in which you need to start the engine manually.
Upvotes: 0