Library / Windows Server and AD

SERVER-026 · Script

Inspect Installed Software and Hotfixes

Lists installed programs and installed Windows updates on one or many computers.

Version 1.0.0Language PowerShellUpdated November 2026Report only, changes nothing

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

NameWhat it doesOptionsDefault
ComputerNameComputers to check. If empty, uses -SearchBase, or this computer.(none)
SearchBaseOU (distinguished name) whose enabled computers are checked.
ServersOnlyWith -SearchBase, only computers running a server operating system.False
NameFilterOnly list programs whose name matches one of these patterns (wildcards allowed).(none)
SkipUpdatesDo not list Windows updates.False
ServerOptional 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

  1. Run it on one test OU, test account or test server and check the output and log.
  2. Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
  3. 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

VersionDateChanges
1.0.0November 2026First release.