Windows – How to Check Installed Version of Windows Management Framework

powershellscriptingwindows

How do you check to see what version of Windows Management Framework (WMF) is installed? It seems like it should be a simple thing to find out, but I cannot. Even Googling a bunch of different versions of the question turns up little to nothing.

It's not in appwiz.cpl, and regedit doesn't find anything for "Windows Management Framework" and it finds too much extraneous stuff for "wmf"

I just want to know how to check it at all, in any reasonable way. Is there a registry key for it? Is there a file I can check? Anything???

The closest thing I could find was here on serverfault: Methods to Detect version of Windows Management Framework. That question starts off the same, but it seems to ask for a specific way of checking to be used in a GPO; perhaps that is why it got no answers.

There are multiple computers I want to check this on. The one I'm starting with is Windows Server 2008 R2 Standard. There will be other Windows Server operating systems as well.

If you know of any tags that work better than what I have, please comment or retag; I couldn't find anything that described this question well.


Update: Some people seem to think that "$PSVersionTable" (and/or various properties of it) is an answer. I finally realized recently that this is a PowerShell variable (maybe 'PS' prefix should have given it away for me, but it didn't) and tried to dig deeper. This resulted in another question: What do the contents of PowerShell's $PSVersionTable represent?.

Update2: Based on all the information I've gathered now and my better understanding, I'm fairly certain that PowerShell's built-in variable $PSVersionTable.PSVersion is not technically the answer to this, but that it is often (sometimes? always? not sure) the same, as in the versions might go hand-in-hand. The $PSVersionTable.WSManStackVersion variable might be what I want, but the official short description of that property shows it as representing the WS-Management stack. Is the WS-Management stack the same thing as WMF? Googling suggests they are closely related, but I'm not sure if the answer to that is yes.

Best Answer

See this documentation from Microsoft:

https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-5.1

In the "Upgrading existing Windows Powershell" section, it says specifically:

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.

I think this is the answer guys. Run $PSVersionTable.PSVersion to get the version.