title: Powershell script check application versions on multiple machines.
body: <p>Im currently running the following commands, but im running them through a foreachloop. I can currently output them both to a csv as just a list for each machine, but ideally id like to output them to a csv of all the machines in the loop, that has the apps listed along the top, then below the computername, version, etc. so that i can append the csv and just have one big csv that i can sort and filter when opened in excel.</p>
  
  <p>Aditionally id also like to be able to alert if app versions are differnt than my baseline, not sure where to start on this though.</p>
  
  <pre><code>$InstalledApps = gwmi Win32Reg_AddRemovePrograms64 | Select DisplayName, Publisher, Version
  
  $InstalledApps += 
  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -Command {gwmi Win32Reg_AddRemovePrograms | Select DisplayName, Publisher, Version}
  
  $InstalledApps = $InstalledApps | sort displayname | Get-Unique -AsString
  
  $InstalledApps| Select DisplayName, Publisher, Version | ogv -PassThru | export-csv .\apps.csv
  </code></pre>
  
  <p>Thanks</p>