Windows 7 and Windows 2008 R2 potentially can have WMF 2, WMF 3, or WMF 4 installed. Windows 2012 could have WMF3 or 4, and 2012 R2 has WMF 4.
I am looking for a method to find which version is installed. Hopefully this can be found via WMI, so I can use it within both Group Policy filters, and as a check within Powershell scripts I am planning on building that require functionality only available if WMF 3 or 4.
I must be asking the question the wrong way because I am not finding answers on Google.
If you are looking for a way to make sure you can run a GPO or PS script against a computer, I think you need to first determine if Powershell is even installed and which version it is. This can be done via the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine
for ver 1 or 2, andHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine
for ver 3 or 4...under the PowerShellVersion value. Is that what you are after?The Powershell variable: $PSVersionTable.PSVersion holds info regarding the WMF as well.
You can simply enter "host" in Powershell you will able to view the "Windows Management Framework" version.
The installation package for PowerShell comes inside a WMF installer. The version of the WMF installer matches the version of PowerShell; there's no stand alone installer for Windows PowerShell.
Version PS = Version WMF
If you need to update your existing version of PowerShell, in Windows, use the following table to locate the installer for the version of PowerShell you want to update to.
Windows PS 3.0 PS 4.0 PS 5.0 PS 5.1 Windows 10 (see Note1) Windows Server 2016 - - - installed Windows 8.1 Windows Server 2012 R2 - installed WMF 5.0 WMF 5.1 Windows 8 Windows Server 2012 installed WMF 4.0 WMF 5.0 WMF 5.1 Windows 7 SP1 Windows Server 2008 R2 SP1 WMF 3.0 WMF 4.0 WMF 5.0 WMF 5.1
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-5.1