I am trying to update all of the Windows 7 machines that we have in one of our OUs in Active Directory with either Powershell 3.0 or 4.0. I would like to use either Group Policy or SCCM 2012 and would like it to be pushed as opposed to optional for users to download and install. An issue I've found is the .Net requirement. Is there a way to package the installer so that it installs the required .Net framework if it is not already installed?
What you can do in SCCM 2012 is use applications instead of packages.
In your instance, first create the .NET Framework application, then create the Powershell application. When creating the PowerShell application, set a dependency of the applicaion you created called .NET Framework with auto-install checked.
When you deploy the PowerShell application, it will check to see if the workstation has .NET Framework installed. If it is installed, it will go ahead installing PowerShell; if it isn't it will install .NET Framework first.
NOTE: Make sure you set the Detection Method for the .NET application (and PowerShell) so it knows how to check if it's installed.
I use this for .NET 4:
Setting Type: Registry Hive: HKLM Key: SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full Value: Integer "This registry setting must exist on the target system to indicate presence of this application" is checked.
As for pushing to the client, make sure the deployment method is set to Required, NOT Available.
I am not using either of these to install PowerShell 4 but came up with a script to do that. You can get the idea and use bits and pieces that applies to your environment.