SERVER-026 · Script
Inspect Installed Software and Hotfixes
Lists installed programs and installed Windows updates on one or many computers.
What it does
For each target computer, reads:
- Programs: name, version, publisher and install date, from the standard uninstall entries
(64-bit and 32-bit), skipping hidden system components and update sub-entries
- Updates: each installed update (KB number), its type and install date
Results go to two CSV files. Use -NameFilter to only list programs whose name matches a pattern, for example "*Java*" or "*Reader*", which makes it quick to find old versions. The script does not use the Win32_Product class, which can trigger repair installs. Targets are the computers you name, the computers in an OU, or this computer. Read-only.
Requirements
Windows PowerShell 5.1. Admin rights on the targets (WinRM or DCOM). The ActiveDirectory module (RSAT) only when -SearchBase is used.
How to run it
- Run as: a service account with the directory rights the script lists, or SYSTEM on a domain controller or the server being checked
- Run from: a domain-joined management server or admin workstation with the RSAT tools, as a scheduled task or from your management tool
- Script type: PowerShell 5.1, 64-bit
- User interaction: none; the script never prompts
- Timeout: 30 minutes for large directories or many servers
Settings
| Name | What it does | Options | Default |
|---|---|---|---|
| ComputerName | Computers to check. If empty, uses -SearchBase, or this computer. | (none) | |
| SearchBase | OU (distinguished name) whose enabled computers are checked. | ||
| ServersOnly | With -SearchBase, only computers running a server operating system. | False | |
| NameFilter | Only list programs whose name matches one of these patterns (wildcards allowed). | (none) | |
| SkipUpdates | Do not list Windows updates. | False | |
| Server | Optional domain controller used to read the OU. |
Exit codes
- 0 = Inventory written for every computer
- 1 = Some computers could not be reached
- 2 = Script error (see log)
Testing steps
- Run it on one test OU, test account or test server and check the output and log.
- Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
- Roll out to a small group next, then everyone.
Rollback steps
Report only. Nothing is changed, so nothing needs to be rolled back.
Version and change log
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release. |