Hi,
how you find the which software is installed on your computer, most of users answered in “Control Panel” , yes it is right . but, if you are creating an Inventory of which system have which software then it’s not so useful for admins.
lets use WMI to retrieve the list of Install list of Softwares:
Cmdlet used: Get-WmiObject, Select-Object, Sort-Object, Export-CSV
Command is:
1: Get-WmiObject win32_Product | Select Name,Version,PackageName,Installdate,Vendor | Sort InstallDate -Descending
using Get-WmiObject cmdlet we query the win32_Product class which have the information of list of all software installations. Then we piped the command to Select cmdlet and we are selecting Name, Version, PackageName and installation date of the softwares and then pipe the command to Sort-Object cmdlet and sorting the result to descending order which mean latest first.
let export the result to CSV for future reference using Export-CSV cmdlet.
1: Get-WmiObject win32_Product | Select Name,Version,PackageName,Installdate,Vendor | Sort InstallDate -Descending| Export-Csv d:\report.csv
all command is same but we piped the command further to Export-CSV cmdlet and saving the file to D:\ with name of Report.CSV
let see if this created a csv file .
yes, file is created lets open it!!!
Done !!! seems good isn’t.
Thanks for viewing
Aman Dhally
How can we take a list of computers from a text file, and then parse that info through so we get results from 500+ computers?
ReplyDeleteI think you can do this easily. You just need to twaek the script a little bit.
Deletethanks
aman
This comment has been removed by a blog administrator.
ReplyDeleteThanks Aman, I made a script for it with a for-each loop. It iterates through it and fetches the data. Here is the page.
ReplyDeleteHi Hdas.
DeleteYou are welcome .
Hi, can the user information ( user who installed the software) be retrieved ?
ReplyDeleteHi,
ReplyDeleteI treid this one and it works fine for all windows installer softwares,
BUT I could get no info about NON-wmi software installed (for example vlc, winzip etc)
what do you suggest about this issue?
Thanks,
Skender
Hi,
ReplyDeletesame issue for me.
what about other installers software (non .msi)?
cheers
Kollcaku
...
ReplyDeleteIn fact as I see the list of packages from the csv/excel list, I see only .msi files and no other types...