Script - Get-SoftwareInfo

There will be times that you will only have the option to use a exe and not a MSI to build an application. Normally that's not a problem but then halfway through building the application you realizes you have no idea what to use for a detection method since when you use a MSI SCCM will import that information for you. That is where this script is very handy for a SCCM admin what I do is install the software manually then run this script to get the Software ID number since that is one of the cleanest ways for SCCM to detect an application.


    Script to show or export installed software information

    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 

    .\Get-SoftwareInfo.ps1 -Export SoftwareInfo.txt

    .\Get-SoftwareInfo.ps1 -Computer IT-Testing-7

    To get an export from a remote computer
    .\Get-SoftwareInfo.ps1 -Computer IT-Testing-7 | Out-File SoftwareInfo.txt

    Created By: Kris Gross
    Twitter: @kmgamd



param($Computer = $env:computername,
      $Export = 0

Function Export-SoftwareInfo
    Get-WmiObject Win32_Product | Format-List IdentifyingNumber, Name, Vendor, Version | Out-File $Export
    Write-Host You can find your export at $Export

Function Show-SoftwareInfo
    Write-Host "Software Info: $Computer"
    Get-WmiObject Win32_Product | Format-Table IdentifyingNumber, Name, Vendor, Version

IF (($Computer -eq $env:computername) -and ($Export -ne 0))
IF (($Computer -eq $env:computername) -and ($Export -eq 0))
IF (($Computer -ne $env:computername) -and ($Export -eq 0))
    Invoke-Command -ComputerName $Computer -ScriptBlock ${function:Show-SoftwareInfo} 
IF (($Computer -ne $env:computername) -and ($Export -ne 0))
    RemoteExport Invoke-Command -ComputerName $Computer -ScriptBlock ${function:Export-SoftwareInfo}

Popular posts from this blog

SCCM Task Sequence GUI - How to set up the TS to work with a GUI

SCCM Applications vs. SCCM Packages: Understanding the Key Differences

How to Deploy a Windows 10 Servicing update as a Application