I am selecting the DisplayName and DisplayVersion properties of an installed application like so:
$response = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like '*My Application*'} | Select-Object DisplayName, DisplayVersion | ft -HideTableHeaders
The result is: My Application 1.2
For additional parsing purposes I need to concatenate the result with a pipe character so it returns as: My Application|1.2
However I'm unable to find the right syntax.