July 2012
Intermediate to advanced
210 pages
4h 33m
English
Here are the steps for configuring PowerShell v2 to run with the .NET 4.0 runtime. (This StackOverflow link has more information: http://bit.ly/GB6gEe.)
PS C:\> cd $PSHOME
PS C:\Windows\System32\WindowsPowerShell\v1.0>
notepad .\powershell.exe.configAdd this XML and save the file:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>Restart the PowerShell console, and then type $PSVersionTable. You should see the following entry:
Name Value ---- ----- CLRVersion 4.0.30319.239