computer asset inventory

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

computer asset inventory

Post by donj »

Win32_Product, although it only contains products installed through Windows Installer. So it may not include everything actually installed on the machine. Also, that class has to be added to Win2003 - it isn't there by default.
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

computer asset inventory

Post by donj »

The win32Reg_AddRemovePrograms class comes from installing SMS Server 2003 onto that computer. It provides different results than Win32_Product. The actual syntax you use (-class or -query) doesn't matter.
User avatar
dee
Posts: 35
Last visit: Wed May 21, 2008 8:36 am

computer asset inventory

Post by dee »

i'm not seeing a particular software installed in the list even though it is truly installed. why is this?
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

computer asset inventory

Post by donj »

As I said, it's not installed on Win2003 by default. You have to add the class.
User avatar
dee
Posts: 35
Last visit: Wed May 21, 2008 8:36 am

computer asset inventory

Post by dee »

also, how come I don't see a particular software installed ? it is truly installed as well. but, when i do a...

Code: Select all

Get-WmiObject -Query "SELECT * FROM Win32_Product" -ComputerName $_ -Credential $cred |
	select-object Name,Vendor,Version,InstallLocation,PackageCache,InstallDate

i do get a list, but one software (the anti virus software) is not listed. Actually, this is one of the softwares I want to filter to show that it is installed. So..

1) how come it is not showing up in the software list?
2) how can i filter it to display that it is installed?
User avatar
dee
Posts: 35
Last visit: Wed May 21, 2008 8:36 am

computer asset inventory

Post by dee »

is there an alternative to see if the software is installed? yeah this software has another installer package other than windows installer.
User avatar
dee
Posts: 35
Last visit: Wed May 21, 2008 8:36 am

computer asset inventory

Post by dee »

or perhaps search for a particular .exe file?
User avatar
dee
Posts: 35
Last visit: Wed May 21, 2008 8:36 am

computer asset inventory

Post by dee »

yes. sorry about that.

1) Can you provide me an example of the CIM_DataFile syntax? Example to find file something.exe?

2) I found how to install the WMI WIndows Installer Provider via control panel/add+remove http://msdn2.microsoft.com/en-us/librar ... S.85).aspx

3) How can out create an output file (.xml or .txt) of the results of my ps? can you provide an example?

Thanks!

Dee
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

computer asset inventory

Post by jvierra »

Here is a jump start:

Code: Select all

gwmi -win32_product | convertto-html  -head "<link href='style.css' rel='stylesheet' type='text/css' />" -property vendor,name,installlocation > products.html

It may not be what you are looking to do but it does demonstrate some ways of approaching output.
This topic is 15 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked