windowspowershellcommandinstalled-applications

Is there any method for getting details of all installed apps in a Windows device using shell commands


I need to get all installed applications and its details in a Windows device using shell commands. I tried using

  1. Get-appxpackage
  2. Get-WmiObject
  3. wmic

Apps that were installed manually seems to be missing in the list. Please help by providing a better method.


Solution

  • An alternative can be to query the registry like this for example:

    # HKLM - Local Machine 
    $InstalledSoftware = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
    foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}
    
    # HKCU - Current User
    InstalledSoftware = Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
    foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}
    

    Check this page out for more:

    https://www.codetwo.com/admins-blog/how-to-check-installed-software-version/


    Tip! Browse these locations in the registry manually before you dig in as it will help you see the structure and understand what properties are available. If the information you're seeking is not there, you might just ditch this suggestion.