0

I am using win32_product to audit installed software in my environment but have noticed a strange gap in the results. I don't think this is caused by bad formatting and am ultimatly concerned I may not be seeing a complete result.

Get-CimInstance -ComputerName $TargetComputer -ClassName win32_product | Select-Object Name, Version 

Name                                                        Version     
----                                                        -------     
Kaspersky Security Center 10 Network Agent                  10.5.1781   
Java 8 Update 161                                           8.0.1610.12 
RBRWSC                                                      4.3.5.27    
Local Administrator Password Solution                       6.2.0.0     
Adobe Refresh Manager                                       1.8.0       
Adobe Acrobat Reader DC                                     19.012.20040
PuTTY release 0.72 (64-bit)                                 0.72.0.0    
Google Update Helper                                        1.3.34.11   


Microsoft Visual C++ 2010  x86 Redistributable - 10.0.30319 10.0.30319  
Microsoft Silverlight                                       5.1.50907.0 
Intel(R) Chipset Device Software                            10.0.13     
Cisco Jabber                                                12.6.1.34405
Kaspersky Endpoint Security for Windows                     11.0.0.6499 
Java Auto Updater                                           2.8.161.12  

I would expect the list to not have this strange space in it. Does anyone know what is causing this?

FrankU32
  • 311
  • 1
  • 3
  • 18
  • 4
    The cause is that there are `Win32_Product` instances without any `Name` or `Version`. – Mathias R. Jessen Sep 04 '19 at 13:02
  • 2
    Note that `Win32_Product` [shouldn't be used](https://gregramsey.net/2012/02/20/win32_product-is-evil/) in the first place. – Ansgar Wiechers Sep 04 '19 at 13:09
  • I don't think this is responses that don't have a ````Name```` or ````version```` as when if i perform the query without the ````select-object```` condition I get the same gap in the data – FrankU32 Sep 04 '19 at 13:34
  • `Get-CimInstance -ComputerName $TargetComputer -ClassName win32_product |Where {$_.Name -notlike "*"} |Format-List *` – Mathias R. Jessen Sep 04 '19 at 13:36
  • You are right, there are a couple of items on this list that only have a value in ````IdentifyingNumber```` Are these corrupt installations? – FrankU32 Sep 04 '19 at 13:42
  • [Never use Win32_Product](https://stackoverflow.com/a/71576041/584676). My answer here shows how to check the registry for software inventory. As for your blank rows above, it's likely items are being retrieved for those blank rows but the Name and Version fields are blank. Could indicate corruption or a borked uninstall of some product since even non-MSI products that get inventoried should have Name and Version properties. – codewario Mar 24 '22 at 14:16

0 Answers0