⚑ PowerShellπŸͺŸ WindowsBeginner

PowerShell Script to Export Installed Software Inventory on Windows

This PowerShell script generates a complete inventory of installed software on Windows systems, covering both 32-bit and 64-bit applications. The output is automatically exported to a timestamped TXT file in C:\Scripts, making it ideal for IT audits, troubleshooting, compliance checks, and MSP workflows.

40views

Introduction

Keeping an accurate inventory of installed software is a core requirement for IT operations, security audits, and license compliance. Native Windows tools often lack structured export options, especially when dealing with mixed 32-bit and 64-bit applications.

This Anavem PowerShell script provides a reliable, read-only method to collect installed software data and export it in a clean, human-readable format.

What This Script Does

The script queries the Windows registry to retrieve:

  • Installed application name
  • Application version
  • Software publisher
  • Installation date (when available)

Both 32-bit and 64-bit application registries are included to ensure complete coverage.

Output Location

All results are written to:

C:\Scripts

Each execution generates a timestamped TXT file, preventing accidental overwrites and simplifying audits.

How to Run the Script

Manual execution

powershell -ExecutionPolicy Bypass -File .\Anavem-InstalledSoftwareInventory.ps1

Automation (Intune / RMM)

The script can be used as:

  • a reporting task
  • a detection script
  • a compliance evidence collector

No administrator privileges are required.

Conclusion

Anavem Installed Software Inventory is a simple yet effective PowerShell utility for Windows administrators who need accurate software visibility without deploying third-party tools. Its file-based output and automation-friendly design make it suitable for both small environments and large-scale enterprise operations.

Script Code

<# 
================================================================================
 Anavem.com - PowerShell Script
================================================================================
 Script Name : Anavem-InstalledSoftwareInventory.ps1
 Description : Exports installed software inventory (32-bit & 64-bit) to TXT
 Author      : Anavem.com
 Version     : 1.0.0
 Website     : https://www.anavem.com

 Use Case    :
 - Software inventory
 - License audits
 - IT support diagnostics
 - Asset documentation
 - MSP / RMM reporting

 Run as Admin: No
================================================================================
#>

# Ensure output directory exists
$OutputDir = "C:\Scripts"
if (-not (Test-Path $OutputDir)) {
    New-Item -Path $OutputDir -ItemType Directory -Force | Out-Null
}

# Output file
$Timestamp  = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$OutputFile = "$OutputDir\Anavem-InstalledSoftwareInventory_$Timestamp.txt"

# Collect installed software (32-bit & 64-bit)
$Software = Get-ItemProperty `
    HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*,
    HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
    Where-Object { $_.DisplayName } |
    Select-Object DisplayName, DisplayVersion, Publisher, InstallDate |
    Sort-Object DisplayName

# Header
$Header = @"
Anavem.com : Installed Software Inventory
Script   : Anavem-InstalledSoftwareInventory.ps1
Version  : 1.0.0
Generated: $(Get-Date)
------------------------------------------------------------

"@

# Write output
$Header | Out-File -FilePath $OutputFile -Encoding UTF8

$Software |
Format-Table DisplayName, DisplayVersion, Publisher, InstallDate -AutoSize |
Out-String |
Out-File -FilePath $OutputFile -Append -Encoding UTF8

Write-Host "Installed software inventory saved to $OutputFile"

Security Notes

  • Read-only registry access
  • No system or registry modifications
  • No network communication
  • Safe for production environments

Source Code

Comments

Want to join the discussion?

Create an account to unlock exclusive member content, save your favorite articles, and join our community of IT professionals.

Sign in