Kae Travis

Find Installed Applications using PowerShell on a Remote Computer

This post provides an example of how we can find installed applications using PowerShell on a remote computer.

It will find installed software for MSIX application packages, App-V application packages and locally installed software.

$ComputerName = "xxx"

Invoke-Command -ComputerName $ComputerName -ScriptBlock {
    $apps = @()

    # 1. MSI / Setup.exe installs (Registry Uninstall Keys)
    $regPaths = @(
        "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
        "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
    )
    foreach ($path in $regPaths) {
        $apps += Get-ItemProperty $path -ErrorAction SilentlyContinue | Select-Object `
            @{Name="Name";Expression={$_."DisplayName"}},
            @{Name="Version";Expression={$_."DisplayVersion"}},
            @{Name="Source";Expression={"Registry"}}
    }

    # 2. MSIX / Appx packages (from registry)
    $appxKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications"
    if (Test-Path $appxKey) {
        $apps += Get-ChildItem $appxKey | ForEach-Object {
            [PSCustomObject]@{
                Name    = $_.PSChildName
                Version = ($_.PSChildName -split "_")[1]
                Source  = "AppX/MSIX (Registry)"
            }
        }
    }

    # 3. App-V packages (if App-V client is installed)
    if (Get-Command Get-AppvClientPackage -All -ErrorAction SilentlyContinue) {
        try {
            $apps += Get-AppvClientPackage | Select-Object `
                @{Name="Name";Expression={$_.Name}},
                @{Name="Version";Expression={$_.Version}},
                @{Name="Source";Expression={"App-V"}}
        } catch {}
    }

    # Filter and sort
    $apps | Where-Object { $_.Name -and $_.Name.Trim() -ne "" } |
        Sort-Object Name -Unique |
        Select-Object Name, Version, Source |
        Format-Table -AutoSize
}
Find Installed Applications using Powershell on a Remote Computer
Find Installed Applications using PowerShell on a Remote Computer

Leave a Reply