Get-SoftwareInfo - V 2.0.0.0
This script allows you to gather and export what software is installed on a local or remote computer. You no not have to have PowerShell Remoting enabled for the script to work on a remote computer. The script shows the Software ID, Name Vendor and Version. This information is sometimes very helpful when you are trying to build an application in SCCM since it can help you to gather the software ID so you can create a discovery method.
<# .SYNOPSIS Script to show or export installed software information .DESCRIPTION The script will display Software ID number, Name, Vendor and Version. .PARAMETER Computer With this parameter you cam run this on a remote computer .PARAMETER Export Allows you to export the information to a file .PARAMETER ExportFile Exportes the software info the a target file, If you do not specify a file then the export will be stored in the script root. .NOTES Created By: Kris Gross Contact: KrisGross@sccmtst.com Twitter: @kmgamd Version: 2.0.0.0 .LINK http://www.sccmtst.com/2017/04/script-get-softwareinfo.html #> param( [Parameter(Mandatory=$true)] $Computer, [switch]$Export, $ExportFile ) Function Export-SoftwareInfo { If ($ExportFile) { Get-WmiObject Win32_Product -ComputerName $Computer | Format-List IdentifyingNumber, Name, Vendor, Version | Out-File $ExportFile } else { $ExportFile = $PSScriptRoot + "\$Computer" + "_Info.txt" Get-WmiObject Win32_Product -ComputerName $Computer | Format-List IdentifyingNumber, Name, Vendor, Version | Out-File $ExportFile } Write-Host "Exported to: $ExportFile" } Function Show-SoftwareInfo { Write-Host "Gathering Software Info on: $Computer" Get-WmiObject Win32_Product -ComputerName $Computer | Format-Table IdentifyingNumber, Name, Vendor, Version } if ($Export) { cls Write-Host "Exporting Software Info, This can take sometime" Export-SoftwareInfo } else { cls Show-SoftwareInfo }