Trying to find a version of Vmware software installed on a server. Using the following command to query the server’s registry I get the information needed. I just want two values, the name of the software and the version. This is contained in a noteproperty named property.
This is the command I am using
"","Wow6432Node" | ForEach-Object {Get-ChildItem HKLM:\SOFTWARE\$_\Microsoft\Windows\CurrentVersion\Uninstall\ | ? {($_.GetValue("DisplayName")) -like "*VMware*"}}
This is a sample of the output:
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Name Property
---- --------
{F32C4E7B-2BF8-4788-8408-824C6 AuthorizedCDFPrefix :
896E1BB} Comments : Build
Contact :
DisplayVersion : 10.3.5.10430147
HelpLink :
HelpTelephone :
InstallDate : 20190314
InstallLocation : C:\Program Files\VMware\VMware Tools\
InstallSource : C:\Program Files\Common Files\VMware\InstallerCache\
ModifyPath : MsiExec.exe /I{F32C4E7B-2BF8-4788-8408-824C6896E1BB}
NoRepair : 1
Publisher : VMware, Inc.
Readme :
Size :
EstimatedSize : 80288
UninstallString : MsiExec.exe /I{F32C4E7B-2BF8-4788-8408-824C6896E1BB}
URLInfoAbout :
URLUpdateInfo :
VersionMajor : 10
VersionMinor : 3
WindowsInstaller : 1
Version : 167968773
Language : 1033
DisplayName : VMware Tools
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
Name Property
---- --------
{2E4FAF13-B720-4385-A23C-5C38D AuthorizedCDFPrefix :
742D6C6} Comments :
Contact :
DisplayVersion : 6.5.0.234
HelpLink :
HelpTelephone :
InstallDate : 20180927
InstallLocation : E:\Tools\PowerCLI\
InstallSource : C:\Users\sa00498\AppData\Local\Downloaded
Installations\vSpherePowerCLI\{49AEB26E-F52E-46C1-9345-6E463CAA115B}\
ModifyPath : MsiExec.exe /I{2E4FAF13-B720-4385-A23C-5C38D742D6C6}
Publisher : VMware, Inc.
Readme :
Size :
EstimatedSize : 255892
UninstallString : MsiExec.exe /I{2E4FAF13-B720-4385-A23C-5C38D742D6C6}
URLInfoAbout : http://www.vmware.com
URLUpdateInfo :
VersionMajor : 6
VersionMinor : 5
WindowsInstaller : 1
Version : 100990976
Language : 1033
DisplayName : VMware PowerCLI
sEstimatedSize2 : 181988
How do I get the DisplayName and DisplayVersion from that NoteProperty? I will need to do this against a list of servers, but first I have to figure this step out. Any help is appreciated. And if you could explain why your suggestion works that would be helpful too.
Thanks