Yesterday I got a question on Twitter from Kyle Wilcox about installing PowerShell 4.0 using MDT for a Windows 7 build. So here it is: A geeks guide to install PowerShell 4.0 for Windows 7 using MDT 2013 Update 2.
Note: If you are looking for a guide on installing PowerShell 5.0 instead, check this post: https://deploymentresearch.com/531/A-Geeks-Guide-to-install-PowerShell-5-0-for-Windows-7-using-MDT
PowerShell 4.0 is part of Windows Management Framework 4.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.
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. 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 after Windows Management Framework 4.0. See the below screenshot.
To check that PowerShell 4.0 is installed, simply open a PowerShell prompt and run the following command: