Windows Management Framework and PowerShell: Need consistent, supported way to detect version from the Operating System
Votes from Connect: 8
Original Date Submitted: 9/5/2014 9:43:02 PM
Site Name: PowerShell
Feedback ID: 964601
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
With the WMF, there is no good consistent way to detect what version is installed. You can query for installed KB's, but that only works if the version of the WMF wasn't already baked into the operating system.
With PowerShell, you can find out what version you have from within PowerShell with $psversiontable, but that information is not available in the OS itself through WMI or the Registry.
For both of these, right now people resort to looking at the version metadata on powershell.exe and letting that imply what version of WMF and PowerShell are there because there is no other method that works. It would be much better if the WMF and PowerShell version information was explicitly available to the operating system.
1. For both the WMF and PowerShell, come up with a place where the version information will be stored in the Registry and WMI so it can be easily inventoried and acted on with tools like ConfigMgr. (I'm sure the ConfigMgr team would jump at the chance to help you come up how to do this in a way that makes systems management easier.)
2. Publish this information like both the .NET Framework and Internet Explorer and teams have done.
3. Release updates to previous versions of WMF that add this information to the Registry and WMI so you can use it consistently.
4. When its time to start working on WMF 6 and beyond, ensure the detection methods and versioning information remain consistent.
I know that this might not seem all that important to developers who only touch a handful of devices. However, as a systems management professional, not having this information easily (and consistently) available on devices makes it more difficult to deploy and manage applications.
Thanks for your help!
Product Studio item created by Connect Synchronizer due to creation of feedback ID 964601 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=964601).
- Decide to deploy the current version of WMF to all workstations in your organization with ConfigMgr.
- Try to make a collection of all workstations that don't have the current version.
- Realize there is no way to inventory this information directly.
-- Ask a computer what version of Windows Management Framework is installed.
-- It doesn't know because that isn't expressly there. (Depending on OS and WMF version, there may or may not be a KB listed. The only thing that can be done today that is consistent across OS's is to imply the WMF version from the powershell.exe file metadata.)
- Go vote up feedback asking the team to make sure version information is available to be easily inventoried and acted upon.
WMF version and PowerShell version information is explicitly defined in the Registry and WMI.
Internal BugId: 8988
This is still an issue with WMF 5.1, since you need to find out if WMF3 is on there first... You need to publish an article for your supported detection method like the .NET and Internet Explorer teams did years ago.
Ray Herring commented
The guidance for installing WMF 5.1 says that WMF 3.0 must be uninstalled first. How do I know WMF 3.0 is installed and if it is how do I uninstall it?
For example on a Win 2K8R2SP1 (64 bit) server. I upgraded NetFramework to 4.6 and then ran the WMF 5.1 installer. $PSVersionTable now lists PSVersion = 5.1.14409.1005 and WSManStackVersion = 3.0.
Is WMI version the same as PowerShell version?
This is still an issue. We have several different flavors of the Windows Management Framework (major/minor versions and differences between OSs). Please follow the example from the Internet Explorer and .NET Framework folks and provide a consistent way to inventory which version is on a device.