Get-RemoteProgram Get list of installed programs on remote or local computer

This script generates a list by querying the registry and returning the installed programs of a local or remote computer. It allows for retrieval of additional properties such as the uninstall string of an application as well.

4.4 Star
100,225 times
Add to favorites
Operating System
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Error
    3 Posts | Last post February 28, 2015
    • Jaap: I get this error. Also anyways to filter for specific app instead of all apps. Thx.
      You cannot call a method on a null-valued expression.
      At C:\scripts\Get-RemoteProgram.ps1:76 char:21
      +                     $RegBase.OpenSubKey($CurrentReg).GetSubKeyNames() |
      +                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : InvokeMethodOnNull
    • I have 32bit PC, so removed 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\' from registry location variable to solve.
      For filter:
      $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition 
      $inputFile = $scriptPath + "\get-RemoteProgram.txt"
      $Servers = Get-Content $inputFile
      Get-RemoteProgram -ComputerName $Servers -Property DisplayVersion | Where-Object {$_.ProgramName -like '*binkiland*'}
    • That is indeed not intended behavior, before releasing version 1.2 I did must have missed this error on 32-bit systems. I have updated the script to version 1.2.1, as manually having to edit the script was never my intention. I have added your name in the patch notes, thanks for letting me know the error was there vsk2014!
  • Not showing all "tools/apps" installed & how to uninstall?
    2 Posts | Last post February 22, 2015
    • Hey Jaap, 
      I am a big fan of your site and contributions all over the scripting world! I'm trying to use this script to gather the installed apps on hundreds of servers. 
      I'm testing on a few to start of course. I'm not seeing some "tools" that are installed on the systems that are the items I have to remove.  These tools are things like HP stuff that was put on some systems, some IBM stuff to collect logs, things like logmein, etc. I don't see the results coming back when I query systems I know have these items. Also I am sure the msi files for some of the items are gone from the servers, and others were .exe installs.  How can I remove these items remotely and can I leverage your script?
    • First of all I just updated the script after seeing your query, so try your luck with version 1.2 which filters out some errors when a registry base is not found.
      This script queries the registry for installed programs. A simple check on a system could be to check the Installed Programs on the server to verify the program is actually listed there as well. Could you give me an example of a tool that does not show up correctly, then I could try to reproduce the error.
      As for remotely uninstalling you can use this script for gathering the uninstallstrings for the programs you would like to uninstall. Then you could use these string to either schedule a remote uninstall by remotely creating a scheduled task on the machine or directly executing the task using either PowerShell remoting, psexec or another solution to remotely execute the uninstallstring on the system.
  • Nothing happens
    3 Posts | Last post August 03, 2014
    • Running the script from C:\Windows\System32 on a Windows 7 64-bit machine (named 1621L03).
      The full command I use is
      PS C:\Windows\system32> C:\windows\system32\Get-RemoteProgram.ps1 -ComputerName
      I get the warning about running untrusted scripts and choose to Run Once.
      Nothing happens. I'm returned to the PS C:\Windows\system32 prompt
    • Ensure you are running powershell as an administrator.  Right click on Powershell or Powershell ISE and select "Run as administrator".  If that doesn't work, go ahead and try adding the following lines to the script:
      $Computers = Read-Host 'What computer would you like the programs for (Comma delimited)?'
      Get-RemoteProgram -ComputerName  $Computers.Split(',')
      At this point, it should prompt you for the computer names you'd like to query.  Enter them in the format of - Server1,Server2,etc...
    • This might either be caused by the Execution-Policy or the fact that this is a file downloaded from the internet.
      Depending on which version of PowerShell you are using, you are able to remove the 'Downloaded from the internet' flag from this file by running the following:
      Unblock-File -Path Get-RemoteProgram.ps1
  • not working
    2 Posts | Last post August 03, 2014
    • I'm having the same issue as JMurphy70.  GlacierWaterIT, where you add the additional line within the script to make it work?
    • This might either be caused by the Execution-Policy or the fact that this is a file downloaded from the internet.
      Depending on which version of PowerShell you are using, you are able to remove the 'Downloaded from the internet' flag from this file by running the following:
      Unblock-File -Path Get-RemoteProgram.ps1
  • original script doesnt work
    2 Posts | Last post August 03, 2014
    • This was written more complicated than it needed to be, so I changed it. feel free to use it. Save it as get-remoteprogram.ps1
      get-remoteprogram computername
      $Computer = $args[0]
      		if (!$computer) {$computer = "This Computer"}
              $RegBase = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine,$Computer)
              $RegUninstall = $RegBase.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall')
              $RegUninstall.GetSubKeyNames() | 
              ForEach-Object {
                  $DisplayName = ($RegBase.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$_")).GetValue('DisplayName')
                  if ($DisplayName) {
                      New-Object -TypeName PSCustomObject -Property @{
                          ComputerName = $Computer
                          ProgramName = $DisplayName
    • Indeed, by removing the function block you are able to use the script directly instead of using the function. If you would like to use this function as a script instead removing the first and the last line of the script is all that it requires.
  • Script fetches wrong results from 32 bit servers targetting 64 bit servers.
    2 Posts | Last post August 03, 2014
    • Hi Jaap
      This method seems to have issues when you run it from a 32 bit server 2008/windwos 7 PS on 64 servers.
      Using WMI to query StdRegProv class is much faster too and yields consistent results, regardless of wat OS architecture its run from.
      Gopinath T
    • I see what you mean, I just updated the script with some additional functionality. I am considering adding in support for querying remote registry using wmi as well as .NET in a future release, but I will have to properly test this solution before I can implement this.
  • get the output of the computernames supplied in the input file
    2 Posts | Last post August 03, 2014
    • Hello,
      I have used the script Get-RemoteProgram.ps1 , and supplied the list of computers in a text file. It is able to read the computer names from the input file , but the output that I am getting it the list of applications installed on the computer from where the script is run.
      Can you please modify the script or apply some tweaks and let me know how I can make it fetch the applications installed on some remote machine in an excel sheet.
    • Sorry for the delayed response, I have included an updated version of this script that now allows you to read the file and pipe the computer names directly into the function. For example you could run:
      Get-Content -Path ListOfComputer.txt | Get-RemoteProgram
      To gather the list of installed software on all the computers that are stored in ListOfComputer.txt
      If you would like to generate output that is useful in Excel you could use the Export-Csv cmdlet as such:
      Get-Content -Path ListOfComputer.txt | Get-RemoteProgram | Export-Csv -Path ProgramList.csv -NoTypeInformation
  • Link
    1 Posts | Last post December 29, 2013
    • Just in case you were interested on that method.
  • Script used in this case is :
    1 Posts | Last post October 17, 2013
    • FOREACH ($PC in get-content C:\Powershell\test.Txt) {  
      # Branch of the Registry  
      # Main Sub Branch you need to open  
      $FileLocation = "C:\Powershell\output.CSV"
      # Drill through each key from the list and pull out the value of  
      # “DisplayName” – Write to the Host console the name of the computer  
      # with the application beside it 
      Foreach ($key in $subkeys)  
          $computername | out-file $FileLocation -Append
          $Value | out-file $FileLocation -Append
61 - 69 of 69 Items