Follow-up post to an earlier post on installing PowerShell 4.0 for Windows 7 using MDT, this time for PowerShell 5.0.
Background info
PowerShell 5.0 is part of Windows Management Framework 5.0 which has .NET Framework 4.5 as a dependency. Since .NET Framework 4.6 has been released, and includes .NET Framework 4.5, I used that version in this guide.
Note: At the time of this writing, April 28, 2016, the Windows Management Framework 5.0 download as well as its release notes incorrectly states that you need Windows Management Framework 4.0 as a prerequisite, but that's not really correct. However, WMF4.0 does contains some QFEs that address an issue with maintaining PSModulePath during installation/uninstallation that is still needed for WMF5.0. Functionally, WMF5.0 doesn't depend on WMF4.0.
Step-by-step Guide
1. Download .NET Framework 4.6.1 ( http://www.microsoft.com/en-us/download/details.aspx?id=49982 ) and create an MDT application using the following settings:
Name: Install – .NET Framework 4.6.1 – x64
Command line: NDP461-KB3102436-x86-x64-AllOS-ENU.exe /passive /norestart
2. Download Windows Management Framework 4.0 ( http://www.microsoft.com/en-us/download/details.aspx?id=40855 ) and create an MDT application using the following settings:
Name: Install – Windows Management Framework 4.0 – x64
Command line: wusa.exe Windows6.1-KB2819745-x64-MultiPkg.msu /quiet /norestart
3. Download Windows Management Framework 5.0 ( http://www.microsoft.com/en-us/download/details.aspx?id=50395 ) and create an MDT application using the following settings:
Name: Install – Windows Management Framework 5.0 – x64
Command line: wusa.exe Win7AndW2K8R2-KB3134760-x64.msu /quiet /norestart
4. Add the applications to the Windows 7 SP1 task sequence, and add a restart in between .NET Framework 4.6.1 and Windows Management Framework 4.0, and also a restart before and after Windows Management Framework 5.0. See the below screenshot.
Adding .NET Framework 4.6.1 and Windows Management Framework 4.0 / 5.0 to your task sequence.
Verifying
To check that PowerShell 5.0 is installed, simply open a PowerShell prompt and run the following command:
$PSVersionTable