PowerShell

Find the List of Installed software using WMI and PowerShell.

 

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.

Software-1

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

Software-2 

let see if this created a csv file .

Software-3

yes, file is created lets open it!!!

Done !!! seems good isn’t.

Software-4

 

Thanks for viewing

Aman Dhally