Wednesday, April 2, 2014

Installing Windows PowerShell 4.0 [Windows Management Framework 4.0]

Quote of the Day :Courage doesn’t always roar. Sometimes courage is the quiet voice at the end of the day saying, “I will try again tomorrow.” - Mary Anne Radmacher"


I have mention in my previous blog post, that to leverage the benefits of the DSC, we have to install the PowerShell Version 4.0.
Windows PowerShell 4.0 is a part of the “Windows Management Framework 4.0” [WMF 4.0].

What WMF 4.0 includes

 

WMF 4.0 included the following.
1.      Windows PowerShell
2.      Windows PowerShell Integrated Scripting Environment (ISE)
3.      Windows PowerShell Web Services (Management OData IIS Extension)
4.      Windows Remote Management (WinRM)
5.      Windows Management Infrastructure (WMI)
6.      Server Manager WMI provider
7.      Windows PowerShell Desired State Configuration (DSC)

Note: Make sure, PowerShell 4.0  is required on the both machines where you are going to write configuration scripts and on the Server and nodes where you want to deploy exported MOF files.

Supporting operating system

 


PowerShell 4.0 {WMF 4.0} can be installed / available  on the below operating Systems.
OS
Built In
Service Pack
Edition
Windows 7
No
Service Pack 1
All
Windows Embedded 7
No

All
Windows Server 2008 R2
No
Service Pack 1
All except IA64
Windows Server 2012
No

All except IA64
Windows 8
No

You can’t install it on Windows 8, upgrade it to 8.1 , then you can install it.
Windows 8.1
Yes


Windows Server 2012 R2

Yes




Note: WMF 3.0 [PowerShell V3] and WMF 2.0 [PowerShell V2] and not required for the installation of WMF 4.0 [PowerShell 4.0]

Requirements for installation:

 


.NET Framework 4.5 must be installed before installing WMF 4.0. Also Try to install all windows update before installing PowerShell 4.0 [WMF 4.0]

Installation on windows 7 or Windows 2008 R2


Windows 7


You can find description on WMF 4.0 at this link :     http://support.microsoft.com/kb/2819745
1.      Download and Install Service Pack 1 for windows 7,  if it is not already installed.
2.      Download and Install .Net Framework 4.5
3.      Download WMF 4.0 and double click on .msu file to start installation.
o   X86
§  Windows6.1-KB2819745-x86.msu 
o   X64
§  Windows6.1-KB2819745-x64-MultiPkg.msu

4.      Reboot your computer once installation is finishes.


Windows 2008 r2

 

You can find description on WMF 4.0 at this link:      http://support.microsoft.com/kb/2819745
The installation of PowerShell 4.0 on Windows 2008 R2 Server is same as windows 7.
I have installed PowerShell 4.0 in one of my freshly installed sever, so it is worth sharing the screenshots of the installation with you.
1.      Make sure that Service Pac1 is installed on your Windows 2008 R2 Server, if Service Pack is not installed , please install it.
b.       02-04-2014 12-14-07
2.      Download and install .Net 4.5
                                                              i.     http://www.microsoft.com/en-us/download/details.aspx?id=30653
                                                            ii.      Accept the Terms
                                                          iii.      Click on Install.
                                                           iv.      02-04-2014 14-35-55
                                                             v.      02-04-2014 14-36-23
                                                           vi.      After few minute {depends on on your internet connection speed} you will see the finish screen on the .NET installer, click on FINISH.
                                                         vii.      02-04-2014 14-46-49
3.      Now, our .NET 4.5 is installed successfully, let’s check which version of PowerShell is installed on the server.
a.      Run $PSVersionTable to check the installed PowerShell version,
                                                              i.      You can see, currently PowerShell version 2.0 is installed.
b.      02-04-2014 14-47-19
4.      Ok’ , let’s run the installation file for WMF 4.0
a.      X64
                                                              i.      Windows6.1-KB2819745-x64-MultiPkg.msu
                                                            ii.      http://www.microsoft.com/en-us/download/details.aspx?id=40855
                                                          iii.      Download and run it
                                                           iv.       
                                                             v.      02-04-2014 14-48-52
                                                           vi.       
                                                         vii.      It will ask you about , that if you want to install the update “KB2819745” , click on YES
                                                       viii.       
                                                           ix.      02-04-2014 14-49-36
                                                             x.      N
                                                           xi.      Accept the licence Term and click on “I Accept”
                                                         xii.      02-04-2014 14-49-51
                                                       xiii.       
                                                       xiv.      It will start the installation of the WMF 4.0
                                                         xv.       
                                                       xvi.      02-04-2014 14-50-04
                                                     xvii.      A
                                                   xviii.      Once the installation is finishes, it will ask you to reboot the server,  please reboot it.
                                                       xix.      02-04-2014 14-52-29
b.      Once you reboot the server , and login back, open the PowerShell console and run the $PSVersionTable to check the PowerShell version
                                                              i.      $psVersionTable
                                                            ii.      And you can see that we have 4.0 installed J
                                                          iii.      02-04-2014 15-05-39


Installation on Windows 2012

 

Installation of WMF 4.0 on windows 2012 is very simple.
1.      .Net 4.5 is preinstalled in Windows Server 2012
2.      Download Windows8-RT-KB2799888-x64.msu
3.      Double click on the .msu file and install it.
4.      Once it is installed, reboot your server.
5.      Check the output of $psversionTable


Things to remember

 



Known Issue


Problem: Installing WMF 4.0 on a computer that is not running .NET 4.5 , may report that the installation is successful but PowerShell 4.0 is not installed.
Solution: Install .NET Framework 4.5 and run the installer again.

That’s all for today, See you in next blog post.

Thank-you (1)
Regards
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.