Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Powershell 2.0 installed in the same location as Powershell 1.0?

Does anyone know why Powershell 2.0 is installed in C:\Windows\System32\WindowsPowerShell\v1.0 on a Windows 7 box?

like image 470
Simon Avatar asked Mar 24 '11 05:03

Simon


People also ask

Can you have multiple versions of PowerShell installed?

As you may know both PowerShell Studio and PrimalScript support multiple versions of Windows PowerShell and allow you to switch between versions depending on what versions of PowerShell are installed. Note: V5 will be officially supported after its release. We do not offer support for preview versions.

Should I disable PowerShell v2?

Answers. The vulnerability is: Windows PowerShell 5.0 added advanced logging features which can provide additional detail when malware has been run on a system. Disabling the Windows PowerShell 2.0 mitigates against a downgrade attack that evades the Windows PowerShell 5.0 script block logging feature.

How do I remove PowerShell 2.0 from Windows 10?

Press Windows + R, type control panel, and press Enter to open Control Panel in Windows 10. Click Uninstall a program under Programs. Click Turn Windows features on or off in the left. Scroll down to find Windows PowerShell 2.0, and uncheck the box next to it.

What is Windows PowerShell 2.0 used for?

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 5.1. Examples of this include older versions of Exchange or SQL Server modules. Such cases are expected to be rare.


1 Answers

It's actually an interesting story in side-effects.

Visual Studio has a fixed list of assemblies in their "Add Reference" dialog.
Anything else has to be browsed for. Developers tended to browse for this location in the Windows directory, where System.Management.Automation.dll (the assembly that runs most of PowerShell lives) This made an absolute reference to this location. Since there wasn't going to be a side-by-side install option with PowerShell (as there is with the .NET framework), the best choice available was to allow people to keep referencing the same assembly, both by path and by StrongName, as they did before.

If this story hadn't have stayed this way, all applications written on top of PowerShell V1 would have to be re-released for V2.

like image 191
Start-Automating Avatar answered Oct 12 '22 11:10

Start-Automating