Powershell get-item VersionInfo.ProductVersion incorrect / different than WMI Powershell get-item VersionInfo.ProductVersion incorrect / different than WMI powershell powershell

Powershell get-item VersionInfo.ProductVersion incorrect / different than WMI


The problem is that you are using the ProductVersion propertie which seems to be hard coded somewhere, IE and WMI are just buildind the product version from :

ProductMajorPart   : 6ProductMinorPart   : 1ProductBuildPart   : 7601ProductPrivatePart : 17767

Same for FileVersion with : FileMajorPart, FileMinorPart, FileBuildPart, FilePrivatePart

Just try :

(get-item C:\windows\system32\rdpcorekmts.dll).VersionInfo | fl *

You can test :

(get-item C:\windows\system32\rdpcorekmts.dll).VersionInfo | % {("{0}.{1}.{2}.{3}" -f $_.ProductMajorPart,$_.ProductMinorPart,$_.ProductBuildPart,$_.ProductPrivatePart)}

From CMD.EXE you can try :

C:\>powershell -command "&{(get-item C:\windows\system32\rdpcorekmts.dll).VersionInfo | % {write-host ('{0}.{1}.{2}.{3}' -f $_.ProductMajorPart,$_.ProductMinorPart,$_.ProductBuildPart,$_.ProductPrivatePart)}}"