Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vendors:microsoft:wmi [2021/03/22 11:27] – [Query] gerardorourkevendors:microsoft:wmi [2021/03/22 17:13] (current) – [Query] gerardorourke
Line 1: Line 1:
 ====== Windows Management Interface (WMI) ====== ====== Windows Management Interface (WMI) ======
 +
 +==== Better option than below ===
 +https://sid-500.com/2018/04/02/powershell-how-to-get-a-list-of-all-installed-software-on-remote-computers/
 +
 +However neither WMI or CimInstance w32_program will retrieve ALL your programs installed. Only programs installed with an MSI show up.
 +So not ideal! Here is a way using Registry.
 +
 +https://www.powershellgallery.com/packages/Get-RemoteProgram/1.2.1
  
 ====Query==== ====Query====
 +
 +<code>
 +Get-CimInstance -ComputerName (Get-Content C:\Temp\Computer.txt) -ClassName win32_product -ErrorAction SilentlyContinue| Select-Object PSComputerName, Name, PackageName, InstallDate | Out-GridView
 +</code>
 +
 +
 +
 +
 +
 <code> <code>
 wmic os get csname,version,caption wmic os get csname,version,caption
Line 11: Line 28:
 Microsoft Windows 10 Pro N  W10-TEST      10.0.18362 Microsoft Windows 10 Pro N  W10-TEST      10.0.18362
 </code> </code>
- 
 ====Query==== ====Query====
 +
 +
 <code>wmic product get Caption,InstallDate,InstallLocation,PackageName,Vendor,Version</code> <code>wmic product get Caption,InstallDate,InstallLocation,PackageName,Vendor,Version</code>
  
-=== Same (truncated) Response ===+=== Sample (truncated) Response ===
 <code> <code>
 Caption                                                                                                     InstallDate  InstallLocation                                                                           PackageName                                                                               Vendor                                    Version Caption                                                                                                     InstallDate  InstallLocation                                                                           PackageName                                                                               Vendor                                    Version
Line 27: Line 45:
 Python 3.8.0 Core Interpreter (32-bit)                                                                      20191216                                                                                               core.msi                                                                                  Python Software Foundation                3.8.150.0 Python 3.8.0 Core Interpreter (32-bit)                                                                      20191216                                                                                               core.msi                                                                                  Python Software Foundation                3.8.150.0
 Python 3.8.0 pip Bootstrap (32-bit)                                                                         20191216                                                                                               pip.msi                                                                                   Python Software Foundation                3.8.150.0 Python 3.8.0 pip Bootstrap (32-bit)                                                                         20191216                                                                                               pip.msi                                                                                   Python Software Foundation                3.8.150.0
 +</code>
 +
 +
 +==== TEMP ====
 +
 +<code>
 +Get-CimInstance -ComputerName ucce-lab-hds-a Win32_OperatingSystem | Select-Object Caption, CSDVersion, ServicePackMajorVersion, BuildNumber  | Export-Csv -NoTypeInformation -Path C:\X-Support\Gerry\WMI\ucce-lab-hds-a-OS_Info.csv
 +Get-CimInstance -ComputerName ucce-lab-hds-a Win32_product | Export-Csv -NoTypeInformation -Path C:\X-Support\Gerry\WMI\ucce-lab-hds-a_product.csv
 +
 </code> </code>
  • vendors/microsoft/wmi.1616412434.txt.gz
  • Last modified: 2021/03/22 11:27
  • by gerardorourke