-
Notifications
You must be signed in to change notification settings - Fork 0
/
Inventory-Applications.ps1
23 lines (19 loc) · 1.2 KB
/
Inventory-Applications.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
################################################################################
# Name: Inventory-Applications.ps1
# Purpose: Queries a local or remote computer for information about software
# applications installed, then exports the data to a CSV file which
# can be opened in a spreadsheet. The output from scanning multiple
# computers can all be appended to one file (each line in the CSV file
# will have the name of the computer). By default, the script creates
# a file in the present directory named ApplicationsInventory.csv.
# However, beware, there are issues when using the Win32_Product class!
# Version: 1.0
# Date: 10.Oct.2012
# Author: Jason Fossen (http://www.sans.org/securing-windows)
# Legal: 0BSD.
################################################################################
param ($ComputerName = ".", $FilePath = ".\ApplicationsInventory.csv")
get-wmiobject -query "SELECT * FROM Win32_Product" -computername $ComputerName |
sort-object Vendor |
select-object PSComputerName,Vendor,Name,Version,Caption,Description,InstallDate,InstallLocation,InstallSource,PackageName |
export-csv -path $FilePath -append