← script library

Automated Software Inventory Script

Software DeploymentDecember 27, 2024

This PowerShell script automates the process of gathering software inventory from a Windows system. By generating a comprehensive list of installed software applications, system administrators can easily manage their software licenses and ensure compliance. Integrating this solution with ServerEngine allows for better oversight and improved asset management, helping organizations to maintain an efficient server and application environment.

powershell
# Get the list of installed software
$softwareList = Get-WmiObject -Class Win32_Product
# Create an array to store the software details
$installedSoftware = @()
foreach ($software in $softwareList) {
    $installedSoftware += [PSCustomObject]@{
        Name = $software.Name
        Version = $software.Version
        Vendor = $software.Vendor
        InstallDate = $software.InstallDate
    }
}
# Output the software inventory to a CSV file
$installedSoftware | Export-Csv -Path "C:\SoftwareInventory.csv" -NoTypeInformation
Write-Output "Software inventory has been successfully generated at C:\SoftwareInventory.csv."

Run it across your fleet

This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.

Ready when you are.

Try ServerEngine free for 7 days.