title: List installed applications on remote servers
body: <p>I have pieced together the following script which lists all installed applications on a local system and writes it into a logfile, but I am unaware how to get this same output when using PSRemoteRegistry, the actual input list I need this against will be all remote targets.</p>
  
  <p>Does anyone have experience with fitting this same code into the cmdlets available through PSRemoteRegistry? Specifically I need it to enumerate the displayname of every installed app found in the key HKLM:\Software\Microsoft\CurrentVersion\Uninstall</p>
  
  <p>The piece I am needing help with getting into the PSRemoteRegistry cmdlets is:</p>
  
  <p><code>Get-ChildItem 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall' | ForEach-Object {Log (Get-ItemProperty $_.pspath).DisplayName}</code></p>
  
  <p>and this is the entire script:</p>
  
  <pre><code>    clear
      #$ErrorActionPreference = "silentlycontinue"
  
      $Logfile = "C:\temp\installed_apps.log"
  
      Function Log
      {
          param([string]$logstring)
  
          Add-Content $Logfile -Value $logstring
      }
  
      $target_list = Get-Content -Path c:\temp\installed_apps_targets.txt
  
      foreach ($system in $target_list){
  
          if (test-connection $system -quiet) 
          {
             Log "---------------Begin $system---------------"
             Get-ChildItem 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall' | ForEach-Object {Log (Get-ItemProperty $_.pspath).DisplayName}
             Log "---------------End $system---------------"
          }
          else 
          {
              Log "**************$system was unreachable**************"
          }
  
  }
  </code></pre>