Windows PowerShell 4.0
Version 4 seem like a routine upgrade of a mature product. In truth, PowerShell V4.0 lacks the excitement or killer new feature of V3 (Intellisense) or V2 (Remoting).
PowerShell 4.0 New Features
What's New In PowerShell 4.0
This is what you get on Windows 8.1 and Server 2012 R2; please note that older operating systems do not support many of these features.
Remember that you get PowerShell version 4.0 automatically with Windows 8.1 and Server 2012 R2. No installation is required here.
Note the version number of your operating system; with Windows 8.0 you only get PowerShell 3.0. Unbelievably, In order to get version 4 here you have to upgrade the operating system to 8.1.
If you have plain Server 2012, 2008 R2, or Windows 7, then you can install Windows Management Framework 4.0, and thus get PowerShell 4.0.
Installing PowerShell 4.0 on Windows 7 SP1
What I did was download the Windows Management Framework (WMF) 4.0 from Microsoft's Download Center. The install file was called: Windows6.1-KB2819745-x64-MultiPkg.msu.
The .Net Framework installation, coupled with PowerShell 4.0 upgrade, was beautifully predictable and blissfully uneventful.
Problems with PowerShell 4.0 on Windows 7
Here is a list of what the Windows 6.1-KB2819745.msu contains:
New feature DSC:
SolarWinds' Network Performance Monitor will help you discover what's happening on your network. This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.
What I like best is the way NPM suggests solutions to network problems. Its also has the ability to monitor the health of individual VMware virtual machines. If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.
Traps for Installing WMF 4.0
Uninstalling PowerShell 4.0
If you need to uninstall WMF, then head for the Control Panel\Programs, 'Uninstall a program', and find: KB2819745.
Here is simple command to check your version of Windows PowerShell.
# Windows PowerShell Version Check
Name: Windows PowerShell ISE Host
Advanced Check .Net Version
Here is a script which interrogates the NET Framework section of the registry.
PSChildName Version ----------- ------- v2.0.50727 2.0.50727.5420 v3.0 3.0.30729.5420 Windows Communication Foundation 3.0.4506.5420 Windows Presentation Foundation 3.0.6920.5011 v3.5 3.5.30729.5420 Client 4.5.50938 Full 4.5.50938 Client 188.8.131.52
Note: This information was obtained from a Windows 7 machine.
Summary of PowerShell 4.0
While Windows 8 was the catalyst for the release of PowerShell version 3.0, Windows Server 2012 R2 may have been the reason for releasing PowerShell 4.0 in general, and the Desired State Configuration (DSC) in particular.
This is the situation: you get PowerShell version 4.0 automatically with Windows 8.1 and Server 2012 R2. If you have plain Server 2012, 2008 R2, or Windows 7 then you can install Windows Management Framework 4.0 and thus get PowerShell v 4.0.
If you like this page then please share it with your friends
See more Windows PowerShell sections
Please email me if you have a better example script. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.