I have installed DotNet 4.5.2 and PowerShell 4 on my Windows 7 SP 1 workstation using chocolatey:
choco install dotnet4.5.2 -y
choco install powershell -y
They installed without errors and appear in the choco list
:
choco list --local-only
DotNet4.5.2 4.5.2.20140902
PowerShell 4.0.20141001
I previously had PowerShell 2.0 installed, and when restarting PowerShell, the $host.version still shows Major: 2
. In addition, it appears that PowerShell 4.0 only exists in the \Program Files (x86)
not in \Windows
, and when I list the contents of the 3.0
directory, only assemblies (no executables) are listed.
> dir 'C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell'
3.0
v1.0
> dir 'C:\Windows\System32\WindowsPowerShell'
v1.0
> dir 'C:\Windows\SysWOW64\WindowsPowerShell'
v1.0
Where does the PowerShell 4.0 executable live? How can I run PowerShell 4.0 instead of 2.0?
I needed to restart my computer for windows update to install Microsoft Windows Management Framework 4.0