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
(63)
100,387 times
Add to favorites
Operating System
4/9/2018
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • The term 'Get-RemoteProgram' is not recognized as the name of a cmdlet, function
    2 Posts | Last post February 27, 2017
    • I followed the instructions but I get error 
      
      The term 'Get-RemoteProgram' is not recognized as the name of a cmdlet, function
    • I find the root cause as metioed below here to user " . .\Get-RemoteProgram.ps1  "
  • Great Stuff , I have an issue - Script doesn't give any output
    1 Posts | Last post February 23, 2017
    • Great Stuff , I have an issue - Script doesn't give any output
      
      PS C:\script> . .\Get-RemoteProgram.ps1 >>text
      PS C:\script>
      
      
      
      
      
      
      
      
      
  • Last Access Time
    3 Posts | Last post February 15, 2017
    • Jaap,
      
      Fantastic script you got here!!  So glad I stumbled upon this.  Do you know of a way to utilize your Get-RemoteProgram to display the last accessed time of the program or perhaps the last modified time?  Currently undergoing a software inventory project to see what is really being utilized on our lab computers.
      
      Thanks in Advance!  
    • Hi Evan,
      
      This is something I wrote up that gives the best estimation on the LastAccessTime attribute of the executables of the program. This should only be used as an estimation as the results on my own system are not entirely accurate, as LastAccessTime is notoriously unreliable:
      
      Get-RemoteProgram -Property InstallLocation | Select-Object -Property *,@{
          name       = 'LastAccessTime'
          expression = {if ($_.InstallLocation) {Get-ChildItem -LiteralPath $_.InstallLocation -Recurse -Filter '*.exe'| Sort-Object -Property LastAccessTime | Select-Object -Last 1 -ExpandProperty LastAccessTime}}
      } 
      
      
      Let me know if this helps you.
      
      
      Regards,
      
      Jaap Brasser
    • Jaap,
      
      Thank you for taking the time to post this.  However, I am getting no dates on any of the result when running on my current pc for testing.  Also how would I implement this with the current script I'm using which calls a list of pc names from a text file and exports to a csv?
      
      Thanks again
      
      . .\Get-remoteprogram.ps1
      $a = Get-Content "D:\PC_NAMES.txt"
      
      foreach ($i in $a)
      {$i ; Get-RemoteProgram -ExcludeSimilar -SimilarWord 3 -computername $i | Select-Object -Property Computername,ProgramName | Sort-Object ProgramName | export-csv -append D:\test2.csv} 
  • Get GUID of installed program
    2 Posts | Last post February 15, 2017
    • Hi Jaap,
      
      Thanks a lot for your script. Can not figure out how to get the script to add per installed program the assocuated GUID.
      
      Thanks for your help.
      Hannes
    • Do you mean the GUID used in the UninstallString? You can retrieve that using the following command:
      
      Get-RemoteProgram -Property UninstallString
      
      Let me know if this works for you.
      
      
      Regards,
      
      Jaap Brasser
  • The term 'Get-RemoteProgram' is not recognized as the name of a cmdlet, function, script file, or operable program
    2 Posts | Last post December 02, 2016
    • While executing the script its throwing The term 'Get-RemoteProgram' is not recognized as the name of a cmdlet, function, script file, or operable program, error 
    • Hello Milan_098,
      
      This is probably because you did not dot source the function in the script, try the following to run the function:
      
      . .\Get-RemoteProgram.ps1
      Get-RemoteProgram
      
      Let me know how that works for you.
      
      
      Regards,
      
      Jaap Brasser
  • Run using different credentials
    1 Posts | Last post November 21, 2016
    • Your script is great and provides everything I'm looking for. I'm having some problems running it with different domain credentials though, any chance you could provide an example?
      
      I'm sure it's my lack of understanding of the Invoke-Command method more than anything.
  • how to interpret this result?
    2 Posts | Last post November 15, 2016
    • the script works fine, but when i execute for another pc, this result comes out:
      
      "Exception calling "OpenRemoteBaseKey" with "2" argument(s): "Attempted to perform an unauthorized operation."
      At C:\Users\M.Zeneli\Downloads\Get-RemoteProgram.ps1:91 char:13
      +             $RegBase = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microso ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : UnauthorizedAccessException"
    • It is likely that you have not given PowerShell permission to run the command on the remote computer. Try running the PowerShell ISE or prompt as Admin (right click on it). This assumes that you (as an individual) has rights to ask the remote computer for the information. For example, I am a tier 2 IT tech, I do not have the user permissions to request installed programs from a tier 3 server. My Admin credentials simply don't have the rights.  
  • PS Remote not allowed
    1 Posts | Last post November 03, 2016
    • Hi Thanks for a great job.
      I have a problem in my environment that is PS remote invoke commands are not allowed.
      Only way i can do remote PS requests is through get-wmiobject. And im really need a script like this to go through my clients installed program. Do you have any time to help me how this should look like
  • Full List in CSV
    1 Posts | Last post October 25, 2016
    • I have to get a list of specific software on my domain, namely software that costs money, or has specific activation counts per licence.  So far I have the following function combining another script I wrote to get all domain PC names, then "foreach" through the pc's and calls your script.  Is there an easier way you can think of?
      
      I currently have this code:
      
      function main() {
      
      	$computers = get-domaincomputers
      	foreach ($comp in $computers)
      	{
      		# Ping the PC first to check if it is alive.....
      		if (Test-Connection -BufferSize 32 -Count 1 -ComputerName $comp -Quiet)
      		{
      			#$pc_Active += $comp
      			Get-RemoteProgram -computername $comp -property Uninstallstring | Where-Object {($_.ProgramName -notmatch $RegEx) -and (-not $_.SystemComponent)} | Export-Csv -Path .\"$comp"_App_list.csv -NoTypeInformation
      		}
      	}
      	
      }
      
      also I want to take this instead of creating a file for each PC create one file with PC Name, Application, Uninstall Path
      
      any quick ideas on how to combine them all into one variable/array, then dump that to CSV?
  • Skipping connection fails
    4 Posts | Last post September 22, 2016
    • Hi Jaap,
      first of all, great, great job. It is very helpful!
      I have a list of computers in the network I'd like to scan.
      Though, not all of them are connected. How do I skip those instead of breaking a script?
      I'm running it:
      . .\Get-RemoteProgram.ps1
      Get-Content -Path 'C:\Users\User1\Desktop\computers.txt' | ForEach-Object {Get-RemoteProgram -ComputerName $_ -Property Uninstallstring | Select-Object -Property ComputerName,ProgramName,Uninstallstring} | Export-Csv -Path C:\Users\User1\Desktop\list.csv -NoTypeInformation
      It breaks whenever finds a machine offline in this very moment. I'd like to just skip it.
      Is it possible?
    • Hello JohnnieDoe1989,
      
      That should not be the case, the script should carry on after an error. Could you check the output of the following to confirm if your ErrorActionPreference is set to something other than continue:
      
      $ErrorActionPreference
      
      Another way is by setting your error action preference before running the script, for example:
      
      . .\Get-RemoteProgram.ps1
      $ErrorActionPreference = 'Continue'
      Get-Content -Path 'C:\Users\User1\Desktop\computers.txt' | ForEach-Object {Get-RemoteProgram -ComputerName $_ -Property Uninstallstring | Select-Object -Property ComputerName,ProgramName,Uninstallstring} | Export-Csv -Path C:\Users\User1\Desktop\list.csv -NoTypeInformation
      
      Let me know how that works for you.
      
      
      Regards,
      
      Jaap Brasser
      
    • Hmm. Maybe I'm just misinterpreting the error:
      
      Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found.
      "
      At C:\Users\User1\Desktop\Get-RemoteProgram.ps1:91 char:13
      +             $RegBase = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microso ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : IOException
       
      PS C:\Users\User1\Desktop> $ErrorActionPreference
      Continue
    • All right, I guess that's not the reason. Someone already had this problem:
      
      Written January 05, 2016
      Jaap Brasser
      It depends on how the workstations were installed, you can define which services are enabled and disabled during and after installation. If you would like to ensure which services are enabled on workstations you could use group policy if you are in a domain environment. Alternative options are:
      - Use a Configuration Management tool to configure workstations, for example: Configuration Manager 2012R2
      - Use DSC to configure workstations
      - Create a templatedisk and deploy workstations from this template
      
      Sorry for bothering you again. Thanks!
21 - 30 of 69 Items